idx int64 1 56k | question stringlengths 15 155 | answer stringlengths 2 29.2k ⌀ | question_cut stringlengths 15 100 | answer_cut stringlengths 2 200 ⌀ | conversation stringlengths 47 29.3k | conversation_cut stringlengths 47 301 |
|---|---|---|---|---|---|---|
40,801 | ARIMA and external regressors in SAS and R | auto.arima can select the order of differencing automatically, and make appropriate forecasts taking account of these differences. It can also include regressors via the xreg argument, and select the appropriate model order taking account of the regressors. If you include regressors, these will be differenced along wit... | ARIMA and external regressors in SAS and R | auto.arima can select the order of differencing automatically, and make appropriate forecasts taking account of these differences. It can also include regressors via the xreg argument, and select the | ARIMA and external regressors in SAS and R
auto.arima can select the order of differencing automatically, and make appropriate forecasts taking account of these differences. It can also include regressors via the xreg argument, and select the appropriate model order taking account of the regressors. If you include regr... | ARIMA and external regressors in SAS and R
auto.arima can select the order of differencing automatically, and make appropriate forecasts taking account of these differences. It can also include regressors via the xreg argument, and select the |
40,802 | Distribution for number of trials before a fixed sum is reached | Let $X_1,X_2,\dots$ be iid $\mathrm{Uniform}\{a,a+1,\dots,b\}$. Find the distibution of $S_n=\mathrm{constant} + X_1+\dots+X_n$ using the information starting on page 285 of this document. Use the Hitting Time Theorem to find the distribution of $T=\inf\,\{n\geq 1:S_n=0\}$. | Distribution for number of trials before a fixed sum is reached | Let $X_1,X_2,\dots$ be iid $\mathrm{Uniform}\{a,a+1,\dots,b\}$. Find the distibution of $S_n=\mathrm{constant} + X_1+\dots+X_n$ using the information starting on page 285 of this document. Use the Hit | Distribution for number of trials before a fixed sum is reached
Let $X_1,X_2,\dots$ be iid $\mathrm{Uniform}\{a,a+1,\dots,b\}$. Find the distibution of $S_n=\mathrm{constant} + X_1+\dots+X_n$ using the information starting on page 285 of this document. Use the Hitting Time Theorem to find the distribution of $T=\inf\,\... | Distribution for number of trials before a fixed sum is reached
Let $X_1,X_2,\dots$ be iid $\mathrm{Uniform}\{a,a+1,\dots,b\}$. Find the distibution of $S_n=\mathrm{constant} + X_1+\dots+X_n$ using the information starting on page 285 of this document. Use the Hit |
40,803 | Distribution for number of trials before a fixed sum is reached | My first step would be to just try this out. While writing such a program I typically get a better idea of how to proceed. Here is how I would write it in Stata (and Mata):
clear all
set obs 10000
mata
// for 10,000 obs role a 6-sided die 24 times
x = ceil(6*runiform(10000,24))
// compute a running sum for each obser... | Distribution for number of trials before a fixed sum is reached | My first step would be to just try this out. While writing such a program I typically get a better idea of how to proceed. Here is how I would write it in Stata (and Mata):
clear all
set obs 10000
ma | Distribution for number of trials before a fixed sum is reached
My first step would be to just try this out. While writing such a program I typically get a better idea of how to proceed. Here is how I would write it in Stata (and Mata):
clear all
set obs 10000
mata
// for 10,000 obs role a 6-sided die 24 times
x = cei... | Distribution for number of trials before a fixed sum is reached
My first step would be to just try this out. While writing such a program I typically get a better idea of how to proceed. Here is how I would write it in Stata (and Mata):
clear all
set obs 10000
ma |
40,804 | Distribution for number of trials before a fixed sum is reached | Another interesting way to arrive at the same answer is to introduce a second random variable $Y$ which is defined through the following constraint
$$
Y = Z - \sum_{i=1}^T X_i
.
$$
Intuitively, for any fixed number of trials, $Y$ will make up the remainder of the sum need to reach $Z$. We can clearly see that
$$
\ma... | Distribution for number of trials before a fixed sum is reached | Another interesting way to arrive at the same answer is to introduce a second random variable $Y$ which is defined through the following constraint
$$
Y = Z - \sum_{i=1}^T X_i
.
$$
Intuitively, for a | Distribution for number of trials before a fixed sum is reached
Another interesting way to arrive at the same answer is to introduce a second random variable $Y$ which is defined through the following constraint
$$
Y = Z - \sum_{i=1}^T X_i
.
$$
Intuitively, for any fixed number of trials, $Y$ will make up the remainde... | Distribution for number of trials before a fixed sum is reached
Another interesting way to arrive at the same answer is to introduce a second random variable $Y$ which is defined through the following constraint
$$
Y = Z - \sum_{i=1}^T X_i
.
$$
Intuitively, for a |
40,805 | Getting NaN value for X-Squared and N/A for p-value in Chi-Square Test | As Glen_B pointed out, your problem is that you can't have expected frequencies to be zero, because that would throw off the calculation of the chi-squared statistic (you'd have zeros in the denominator). For example, see that
x1 <- matrix(c(0, 1, 0, 1), 2, 2)
x1
[,1] [,2]
[1,] 0 0
[2,] 1 1
and
x2 <- ... | Getting NaN value for X-Squared and N/A for p-value in Chi-Square Test | As Glen_B pointed out, your problem is that you can't have expected frequencies to be zero, because that would throw off the calculation of the chi-squared statistic (you'd have zeros in the denominat | Getting NaN value for X-Squared and N/A for p-value in Chi-Square Test
As Glen_B pointed out, your problem is that you can't have expected frequencies to be zero, because that would throw off the calculation of the chi-squared statistic (you'd have zeros in the denominator). For example, see that
x1 <- matrix(c(0, 1, 0... | Getting NaN value for X-Squared and N/A for p-value in Chi-Square Test
As Glen_B pointed out, your problem is that you can't have expected frequencies to be zero, because that would throw off the calculation of the chi-squared statistic (you'd have zeros in the denominat |
40,806 | Conditional Expectation has the minimum mean prediction error | You can adapt the following argument to get a full answer to your question. For random variables $X$ and $Y$, and a measurable function $f$, we have
$$
\newcommand{\E}{\mathbb{E}}
\E[(Y-f(X))^2] = \E[(Y-\E[Y\mid X]+\E[Y\mid X]-f(X))^2]
$$
$$
= \E[(Y-\E[Y\mid X])^2] - 2\,\E[(Y-\E[Y\mid X])(\E[Y\mid X]-f(X))] + \E... | Conditional Expectation has the minimum mean prediction error | You can adapt the following argument to get a full answer to your question. For random variables $X$ and $Y$, and a measurable function $f$, we have
$$
\newcommand{\E}{\mathbb{E}}
\E[(Y-f(X))^2] = | Conditional Expectation has the minimum mean prediction error
You can adapt the following argument to get a full answer to your question. For random variables $X$ and $Y$, and a measurable function $f$, we have
$$
\newcommand{\E}{\mathbb{E}}
\E[(Y-f(X))^2] = \E[(Y-\E[Y\mid X]+\E[Y\mid X]-f(X))^2]
$$
$$
= \E[(Y-\... | Conditional Expectation has the minimum mean prediction error
You can adapt the following argument to get a full answer to your question. For random variables $X$ and $Y$, and a measurable function $f$, we have
$$
\newcommand{\E}{\mathbb{E}}
\E[(Y-f(X))^2] = |
40,807 | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | PCA calculates the eigenvalues that explain most of the variation across the data, in this case it would operate per feature vector and does not take account of class labels.
LDA maximizes Fishers discriminant ratio (or Mahalaobis distance), i.e. it maximizes the distance between classes.
If you define the feature vec... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | PCA calculates the eigenvalues that explain most of the variation across the data, in this case it would operate per feature vector and does not take account of class labels.
LDA maximizes Fishers di | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
PCA calculates the eigenvalues that explain most of the variation across the data, in this case it would operate per feature vector and does not take account of class labels.
LDA maximizes Fishers discriminant ratio (or Mahala... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
PCA calculates the eigenvalues that explain most of the variation across the data, in this case it would operate per feature vector and does not take account of class labels.
LDA maximizes Fishers di |
40,808 | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | Your problem is most likely overfitting - it is typical when you use small datasets with large number of dimensions. In case of LDA what usually happens that the covariance matrix is biased because of the small sample. In order to avoid it you may try to use regularization. One useful technique is to sphere covariance ... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | Your problem is most likely overfitting - it is typical when you use small datasets with large number of dimensions. In case of LDA what usually happens that the covariance matrix is biased because of | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
Your problem is most likely overfitting - it is typical when you use small datasets with large number of dimensions. In case of LDA what usually happens that the covariance matrix is biased because of the small sample. In order... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
Your problem is most likely overfitting - it is typical when you use small datasets with large number of dimensions. In case of LDA what usually happens that the covariance matrix is biased because of |
40,809 | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | I am doing the similar thing with neuronal spikes. Some papers I am following did PCA and selected components that explain 90% variance then did LDA, with the main purpose being "avoiding singular matrix", which to some extent makes sense, but can be avoided by "eigen solver" and "shrinkage".
There are 3 reasons why I ... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | I am doing the similar thing with neuronal spikes. Some papers I am following did PCA and selected components that explain 90% variance then did LDA, with the main purpose being "avoiding singular mat | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
I am doing the similar thing with neuronal spikes. Some papers I am following did PCA and selected components that explain 90% variance then did LDA, with the main purpose being "avoiding singular matrix", which to some extent ... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
I am doing the similar thing with neuronal spikes. Some papers I am following did PCA and selected components that explain 90% variance then did LDA, with the main purpose being "avoiding singular mat |
40,810 | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | BGreene's answer is a good one, but I would just add that it might make even more sense to go from PCA to the more closely related LDA classifier, which is Latent Dirichlet Allocation. As the name implies, it's a latent variable technique, like PCA. It's trending highly in the classification literature (I'm using it my... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA? | BGreene's answer is a good one, but I would just add that it might make even more sense to go from PCA to the more closely related LDA classifier, which is Latent Dirichlet Allocation. As the name imp | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
BGreene's answer is a good one, but I would just add that it might make even more sense to go from PCA to the more closely related LDA classifier, which is Latent Dirichlet Allocation. As the name implies, it's a latent variabl... | Does PCA followed by LDA make sense, when there is more data available for PCA than for LDA?
BGreene's answer is a good one, but I would just add that it might make even more sense to go from PCA to the more closely related LDA classifier, which is Latent Dirichlet Allocation. As the name imp |
40,811 | Histogram of uncertain data | It's not clear to me why this would be an issue in a simple plot of a univariate distribution. However, it's worth knowing that histograms aren't typically considered to be a very good way to visualize a univariate distribution. Kernel density plots are generally considered to be better. These are estimated by drawi... | Histogram of uncertain data | It's not clear to me why this would be an issue in a simple plot of a univariate distribution. However, it's worth knowing that histograms aren't typically considered to be a very good way to visuali | Histogram of uncertain data
It's not clear to me why this would be an issue in a simple plot of a univariate distribution. However, it's worth knowing that histograms aren't typically considered to be a very good way to visualize a univariate distribution. Kernel density plots are generally considered to be better. ... | Histogram of uncertain data
It's not clear to me why this would be an issue in a simple plot of a univariate distribution. However, it's worth knowing that histograms aren't typically considered to be a very good way to visuali |
40,812 | Histogram of uncertain data | While I think @gung's answer is probably the right approach here, I'd like to address the original question on its own terms; I think it's an interesting question that also deserves an answer.
There are two issues here:
1) histogram bars already have an uncertainty associated with them.
2) You're apparently talking abo... | Histogram of uncertain data | While I think @gung's answer is probably the right approach here, I'd like to address the original question on its own terms; I think it's an interesting question that also deserves an answer.
There a | Histogram of uncertain data
While I think @gung's answer is probably the right approach here, I'd like to address the original question on its own terms; I think it's an interesting question that also deserves an answer.
There are two issues here:
1) histogram bars already have an uncertainty associated with them.
2) Y... | Histogram of uncertain data
While I think @gung's answer is probably the right approach here, I'd like to address the original question on its own terms; I think it's an interesting question that also deserves an answer.
There a |
40,813 | How to avoid 0 determinant when sample covariance matrix has very small values | Several things.
The determinant is scale equivariant, so without loss of generality you can rescale your $x_i$'s (say multiply them by 10) and then factor back the scale after all the intermediate operations have been performed as shown in the following R code:
p <- 10
n <- 100
a1 <- matrix(runif(n*p),n,p)
a1 <- swee... | How to avoid 0 determinant when sample covariance matrix has very small values | Several things.
The determinant is scale equivariant, so without loss of generality you can rescale your $x_i$'s (say multiply them by 10) and then factor back the scale after all the intermediate o | How to avoid 0 determinant when sample covariance matrix has very small values
Several things.
The determinant is scale equivariant, so without loss of generality you can rescale your $x_i$'s (say multiply them by 10) and then factor back the scale after all the intermediate operations have been performed as shown in... | How to avoid 0 determinant when sample covariance matrix has very small values
Several things.
The determinant is scale equivariant, so without loss of generality you can rescale your $x_i$'s (say multiply them by 10) and then factor back the scale after all the intermediate o |
40,814 | How to avoid 0 determinant when sample covariance matrix has very small values | Numerical stability will be a problem for you.
One approach to make the calculation a little more stable - taking $X$ to be a mean-corrected matrix of the $x$-values, I think it makes sense to either form a QR decomposition of the $X$-matrix or failing that a Choleski decomposition of the $X'X$ matrix, and use the prod... | How to avoid 0 determinant when sample covariance matrix has very small values | Numerical stability will be a problem for you.
One approach to make the calculation a little more stable - taking $X$ to be a mean-corrected matrix of the $x$-values, I think it makes sense to either | How to avoid 0 determinant when sample covariance matrix has very small values
Numerical stability will be a problem for you.
One approach to make the calculation a little more stable - taking $X$ to be a mean-corrected matrix of the $x$-values, I think it makes sense to either form a QR decomposition of the $X$-matrix... | How to avoid 0 determinant when sample covariance matrix has very small values
Numerical stability will be a problem for you.
One approach to make the calculation a little more stable - taking $X$ to be a mean-corrected matrix of the $x$-values, I think it makes sense to either |
40,815 | How to calculate cumulative Poisson probabilities without adding each one if no. of outcomes is large and hence, adding (without excel) is difficult? | The Skellam distribution is the distribution of the difference in counts of two independent Poisson variates:
http://en.wikipedia.org/wiki/Skellam_distribution
But you will still need a computer to calculate the modified Bessel function. Here is an Excel example.
This image (which can be magnified by zooming in the b... | How to calculate cumulative Poisson probabilities without adding each one if no. of outcomes is larg | The Skellam distribution is the distribution of the difference in counts of two independent Poisson variates:
http://en.wikipedia.org/wiki/Skellam_distribution
But you will still need a computer to ca | How to calculate cumulative Poisson probabilities without adding each one if no. of outcomes is large and hence, adding (without excel) is difficult?
The Skellam distribution is the distribution of the difference in counts of two independent Poisson variates:
http://en.wikipedia.org/wiki/Skellam_distribution
But you wi... | How to calculate cumulative Poisson probabilities without adding each one if no. of outcomes is larg
The Skellam distribution is the distribution of the difference in counts of two independent Poisson variates:
http://en.wikipedia.org/wiki/Skellam_distribution
But you will still need a computer to ca |
40,816 | Smoothing a time series of ratios | It would be erroneous to compute the ratios of the smoothed counts, because it's possible many of the ratios would not be true proportions--they could (easily) wind up outside the valid range from $0$ to $1$. (This happens in the example described below.)
Since the denominators $b_t$ vary substantially, and a count ba... | Smoothing a time series of ratios | It would be erroneous to compute the ratios of the smoothed counts, because it's possible many of the ratios would not be true proportions--they could (easily) wind up outside the valid range from $0$ | Smoothing a time series of ratios
It would be erroneous to compute the ratios of the smoothed counts, because it's possible many of the ratios would not be true proportions--they could (easily) wind up outside the valid range from $0$ to $1$. (This happens in the example described below.)
Since the denominators $b_t$ ... | Smoothing a time series of ratios
It would be erroneous to compute the ratios of the smoothed counts, because it's possible many of the ratios would not be true proportions--they could (easily) wind up outside the valid range from $0$ |
40,817 | Smoothing a time series of ratios | I am no expert in time series, but no one has answered so.... A little playing on a Thursday afternoon:
#MAKE UP DATA
set.seed(16549678)
time <- 1:100
a <- round(runif(100, 5, 10) + rnorm(100,0,1))
b <- round(a*4+rnorm(100))
x <- a/b
#PLOTS OF RAW DATA, RED IS FOR B
plot(time, a, ylim = c(0,50), type = 'l')
lines(x = ... | Smoothing a time series of ratios | I am no expert in time series, but no one has answered so.... A little playing on a Thursday afternoon:
#MAKE UP DATA
set.seed(16549678)
time <- 1:100
a <- round(runif(100, 5, 10) + rnorm(100,0,1))
b | Smoothing a time series of ratios
I am no expert in time series, but no one has answered so.... A little playing on a Thursday afternoon:
#MAKE UP DATA
set.seed(16549678)
time <- 1:100
a <- round(runif(100, 5, 10) + rnorm(100,0,1))
b <- round(a*4+rnorm(100))
x <- a/b
#PLOTS OF RAW DATA, RED IS FOR B
plot(time, a, ylim... | Smoothing a time series of ratios
I am no expert in time series, but no one has answered so.... A little playing on a Thursday afternoon:
#MAKE UP DATA
set.seed(16549678)
time <- 1:100
a <- round(runif(100, 5, 10) + rnorm(100,0,1))
b |
40,818 | How to deal with repeated measurements in the same condition of a factorial experiment? | Multi-level models (aka mixed models etc) are designed to deal with the case where you have multiple measures on one person.
In the typical 2x2 design (not repeated measures) you have multiple observations in each cell, but these are on different and unrelated subjects (people or whatever), thus, they are independent, ... | How to deal with repeated measurements in the same condition of a factorial experiment? | Multi-level models (aka mixed models etc) are designed to deal with the case where you have multiple measures on one person.
In the typical 2x2 design (not repeated measures) you have multiple observa | How to deal with repeated measurements in the same condition of a factorial experiment?
Multi-level models (aka mixed models etc) are designed to deal with the case where you have multiple measures on one person.
In the typical 2x2 design (not repeated measures) you have multiple observations in each cell, but these ar... | How to deal with repeated measurements in the same condition of a factorial experiment?
Multi-level models (aka mixed models etc) are designed to deal with the case where you have multiple measures on one person.
In the typical 2x2 design (not repeated measures) you have multiple observa |
40,819 | How to deal with repeated measurements in the same condition of a factorial experiment? | I think that you don't have to include trial as a random factor (unless it makes any sense, but you said they were just repetitions in random order). You only have to declare subjects as a random factor and R will detect that you have 4 observations per subject*B cell. Check df in the output (if you use nlme) to confir... | How to deal with repeated measurements in the same condition of a factorial experiment? | I think that you don't have to include trial as a random factor (unless it makes any sense, but you said they were just repetitions in random order). You only have to declare subjects as a random fact | How to deal with repeated measurements in the same condition of a factorial experiment?
I think that you don't have to include trial as a random factor (unless it makes any sense, but you said they were just repetitions in random order). You only have to declare subjects as a random factor and R will detect that you ha... | How to deal with repeated measurements in the same condition of a factorial experiment?
I think that you don't have to include trial as a random factor (unless it makes any sense, but you said they were just repetitions in random order). You only have to declare subjects as a random fact |
40,820 | Deep learning libraries/software with good tutorials or examples | http://www.deeplearning.net/tutorial/ uses Theano, which can run on a GPU. | Deep learning libraries/software with good tutorials or examples | http://www.deeplearning.net/tutorial/ uses Theano, which can run on a GPU. | Deep learning libraries/software with good tutorials or examples
http://www.deeplearning.net/tutorial/ uses Theano, which can run on a GPU. | Deep learning libraries/software with good tutorials or examples
http://www.deeplearning.net/tutorial/ uses Theano, which can run on a GPU. |
40,821 | Deep learning libraries/software with good tutorials or examples | @Adrian already mentioned Theano. The other big player here is Torch7, which runs on Lua and also has GPU integration. There's a bit of discussion of their relative strengths and weaknesses here. | Deep learning libraries/software with good tutorials or examples | @Adrian already mentioned Theano. The other big player here is Torch7, which runs on Lua and also has GPU integration. There's a bit of discussion of their relative strengths and weaknesses here. | Deep learning libraries/software with good tutorials or examples
@Adrian already mentioned Theano. The other big player here is Torch7, which runs on Lua and also has GPU integration. There's a bit of discussion of their relative strengths and weaknesses here. | Deep learning libraries/software with good tutorials or examples
@Adrian already mentioned Theano. The other big player here is Torch7, which runs on Lua and also has GPU integration. There's a bit of discussion of their relative strengths and weaknesses here. |
40,822 | Deep learning libraries/software with good tutorials or examples | The course from Hinton at https://class.coursera.org/neuralnets-2012-001/class is the best basic tutorial I found online. I think before you use tutorials from deeplearning.net, this would offer more insight. | Deep learning libraries/software with good tutorials or examples | The course from Hinton at https://class.coursera.org/neuralnets-2012-001/class is the best basic tutorial I found online. I think before you use tutorials from deeplearning.net, this would offer more | Deep learning libraries/software with good tutorials or examples
The course from Hinton at https://class.coursera.org/neuralnets-2012-001/class is the best basic tutorial I found online. I think before you use tutorials from deeplearning.net, this would offer more insight. | Deep learning libraries/software with good tutorials or examples
The course from Hinton at https://class.coursera.org/neuralnets-2012-001/class is the best basic tutorial I found online. I think before you use tutorials from deeplearning.net, this would offer more |
40,823 | Random Balls in Random Buckets: What are the characteristics of the distribution? | Presuming each bucket is chosen with equal probability, and the balls are dropped independently, then the number of balls in each bucket would follow a multinomial distribution with $k$ trials and $p_1 = p_2 = \cdots = p_N = 1/N$. The probability of a particular bucket containing $x$ balls would be given by the binomi... | Random Balls in Random Buckets: What are the characteristics of the distribution? | Presuming each bucket is chosen with equal probability, and the balls are dropped independently, then the number of balls in each bucket would follow a multinomial distribution with $k$ trials and $p_ | Random Balls in Random Buckets: What are the characteristics of the distribution?
Presuming each bucket is chosen with equal probability, and the balls are dropped independently, then the number of balls in each bucket would follow a multinomial distribution with $k$ trials and $p_1 = p_2 = \cdots = p_N = 1/N$. The pr... | Random Balls in Random Buckets: What are the characteristics of the distribution?
Presuming each bucket is chosen with equal probability, and the balls are dropped independently, then the number of balls in each bucket would follow a multinomial distribution with $k$ trials and $p_ |
40,824 | Is listwise deletion / complete case analysis biased if data are not missing completely at random? | You are not wrong.
From:
Statistical Analysis with Missing Data,
Second Edition,
Roderick J.A. Little & Donald B Rubin,
John Wiley and Sons, 2002. p41:
Complete Case analysis confines attention to cases where all variables are present. Advantages of this approach are .... . Disadvantages stem from the potential loss... | Is listwise deletion / complete case analysis biased if data are not missing completely at random? | You are not wrong.
From:
Statistical Analysis with Missing Data,
Second Edition,
Roderick J.A. Little & Donald B Rubin,
John Wiley and Sons, 2002. p41:
Complete Case analysis confines attention to c | Is listwise deletion / complete case analysis biased if data are not missing completely at random?
You are not wrong.
From:
Statistical Analysis with Missing Data,
Second Edition,
Roderick J.A. Little & Donald B Rubin,
John Wiley and Sons, 2002. p41:
Complete Case analysis confines attention to cases where all varia... | Is listwise deletion / complete case analysis biased if data are not missing completely at random?
You are not wrong.
From:
Statistical Analysis with Missing Data,
Second Edition,
Roderick J.A. Little & Donald B Rubin,
John Wiley and Sons, 2002. p41:
Complete Case analysis confines attention to c |
40,825 | Is listwise deletion / complete case analysis biased if data are not missing completely at random? | In general, complete case analysis is biased when data are not MCAR. However, when the analysis consists of fitting a regression model, complete case analysis is unbiased under the weaker condition that missingness is independent of the outcome variable, conditional on the covariates. Depending on which variable(s) con... | Is listwise deletion / complete case analysis biased if data are not missing completely at random? | In general, complete case analysis is biased when data are not MCAR. However, when the analysis consists of fitting a regression model, complete case analysis is unbiased under the weaker condition th | Is listwise deletion / complete case analysis biased if data are not missing completely at random?
In general, complete case analysis is biased when data are not MCAR. However, when the analysis consists of fitting a regression model, complete case analysis is unbiased under the weaker condition that missingness is ind... | Is listwise deletion / complete case analysis biased if data are not missing completely at random?
In general, complete case analysis is biased when data are not MCAR. However, when the analysis consists of fitting a regression model, complete case analysis is unbiased under the weaker condition th |
40,826 | What is the correct sample size when calculating CI for a subset of results? | As I interpret the question, this problem can easily be resolved through some careful reasoning about what is going on and what the survey objectives are. We can even do some simple mental calculations as a check on the confidence interval produced by the software.
Consider this model of the survey. In a population, ... | What is the correct sample size when calculating CI for a subset of results? | As I interpret the question, this problem can easily be resolved through some careful reasoning about what is going on and what the survey objectives are. We can even do some simple mental calculatio | What is the correct sample size when calculating CI for a subset of results?
As I interpret the question, this problem can easily be resolved through some careful reasoning about what is going on and what the survey objectives are. We can even do some simple mental calculations as a check on the confidence interval pr... | What is the correct sample size when calculating CI for a subset of results?
As I interpret the question, this problem can easily be resolved through some careful reasoning about what is going on and what the survey objectives are. We can even do some simple mental calculatio |
40,827 | What is the correct sample size when calculating CI for a subset of results? | No the 616 does not constitute a random sample from the population. It is a specific subset that answered yes to question 1a. Is quality B only assessed on those 616 or is it also studied for the remaining 2415? There is no simple answer to your question. You could bootstrap the 3031 and for each bootstrap sample you... | What is the correct sample size when calculating CI for a subset of results? | No the 616 does not constitute a random sample from the population. It is a specific subset that answered yes to question 1a. Is quality B only assessed on those 616 or is it also studied for the rem | What is the correct sample size when calculating CI for a subset of results?
No the 616 does not constitute a random sample from the population. It is a specific subset that answered yes to question 1a. Is quality B only assessed on those 616 or is it also studied for the remaining 2415? There is no simple answer to ... | What is the correct sample size when calculating CI for a subset of results?
No the 616 does not constitute a random sample from the population. It is a specific subset that answered yes to question 1a. Is quality B only assessed on those 616 or is it also studied for the rem |
40,828 | Combining results from (GBM or any other) model based on samples from a very large database | This paper follows an approach very similar to the one you suggest, but they stratify the samples. In their case, each model sees a particular part of the geographic space, which lets the different submodels specialize. Figures 6 and 8 show that this partitioning can lead to better results than trying to fit the whole... | Combining results from (GBM or any other) model based on samples from a very large database | This paper follows an approach very similar to the one you suggest, but they stratify the samples. In their case, each model sees a particular part of the geographic space, which lets the different s | Combining results from (GBM or any other) model based on samples from a very large database
This paper follows an approach very similar to the one you suggest, but they stratify the samples. In their case, each model sees a particular part of the geographic space, which lets the different submodels specialize. Figures... | Combining results from (GBM or any other) model based on samples from a very large database
This paper follows an approach very similar to the one you suggest, but they stratify the samples. In their case, each model sees a particular part of the geographic space, which lets the different s |
40,829 | Combining results from (GBM or any other) model based on samples from a very large database | Not quite the answer you are looking for but...
Do you really need to use that much data? How many predictors do you have? If the number of predictors is small, how much of the data is redundant and just filling in the predictor space? Is it all relevant? Are there data points that are not really in the application dom... | Combining results from (GBM or any other) model based on samples from a very large database | Not quite the answer you are looking for but...
Do you really need to use that much data? How many predictors do you have? If the number of predictors is small, how much of the data is redundant and j | Combining results from (GBM or any other) model based on samples from a very large database
Not quite the answer you are looking for but...
Do you really need to use that much data? How many predictors do you have? If the number of predictors is small, how much of the data is redundant and just filling in the predictor... | Combining results from (GBM or any other) model based on samples from a very large database
Not quite the answer you are looking for but...
Do you really need to use that much data? How many predictors do you have? If the number of predictors is small, how much of the data is redundant and j |
40,830 | Combining results from (GBM or any other) model based on samples from a very large database | In the spirit of using summaries to avoid using all that data. May be going in quite a different from your original request. Just a very naive way to get started - this could probably be done on a very large Postgres instance. This is an initial exploration step so it uses crude sums and counts to get some rough insig... | Combining results from (GBM or any other) model based on samples from a very large database | In the spirit of using summaries to avoid using all that data. May be going in quite a different from your original request. Just a very naive way to get started - this could probably be done on a ver | Combining results from (GBM or any other) model based on samples from a very large database
In the spirit of using summaries to avoid using all that data. May be going in quite a different from your original request. Just a very naive way to get started - this could probably be done on a very large Postgres instance. ... | Combining results from (GBM or any other) model based on samples from a very large database
In the spirit of using summaries to avoid using all that data. May be going in quite a different from your original request. Just a very naive way to get started - this could probably be done on a ver |
40,831 | Understanding the calculation of the independent samples Cohen's d from t & df | The SD used in the t calculation is that of the effect, not of the individual groups. In the paired case the SD to use in Cohen's d and t are the same. But the SD used in the d calculation for independent samples is the pooled SD of the individual groups, not the theoretical SD of the effect. Under the assumptions of... | Understanding the calculation of the independent samples Cohen's d from t & df | The SD used in the t calculation is that of the effect, not of the individual groups. In the paired case the SD to use in Cohen's d and t are the same. But the SD used in the d calculation for indepe | Understanding the calculation of the independent samples Cohen's d from t & df
The SD used in the t calculation is that of the effect, not of the individual groups. In the paired case the SD to use in Cohen's d and t are the same. But the SD used in the d calculation for independent samples is the pooled SD of the ind... | Understanding the calculation of the independent samples Cohen's d from t & df
The SD used in the t calculation is that of the effect, not of the individual groups. In the paired case the SD to use in Cohen's d and t are the same. But the SD used in the d calculation for indepe |
40,832 | Goodness of fit test for a mixture in R | You can write a function that calculates the relevant value for a given test under the null hypothesis based on the outputs from, say, normalmixEM, then do the test using that. For example, for the Kolmogorov-Smirnov test, we need the CDF given a set of parameters:
# CDF of mixture of two normals
pmnorm <- function(x,... | Goodness of fit test for a mixture in R | You can write a function that calculates the relevant value for a given test under the null hypothesis based on the outputs from, say, normalmixEM, then do the test using that. For example, for the K | Goodness of fit test for a mixture in R
You can write a function that calculates the relevant value for a given test under the null hypothesis based on the outputs from, say, normalmixEM, then do the test using that. For example, for the Kolmogorov-Smirnov test, we need the CDF given a set of parameters:
# CDF of mixt... | Goodness of fit test for a mixture in R
You can write a function that calculates the relevant value for a given test under the null hypothesis based on the outputs from, say, normalmixEM, then do the test using that. For example, for the K |
40,833 | How to determine if there is a drop in revenue after a change in the system? | You could do a simple t test of the means of the two periods. Be sure that there is not some kind of upward or downward trend in the data over the two years, because this can lead to the wrong conclusions of the t test value.
you may need to use Welch's t test(R uses this as standard) which is a modification of the sta... | How to determine if there is a drop in revenue after a change in the system? | You could do a simple t test of the means of the two periods. Be sure that there is not some kind of upward or downward trend in the data over the two years, because this can lead to the wrong conclus | How to determine if there is a drop in revenue after a change in the system?
You could do a simple t test of the means of the two periods. Be sure that there is not some kind of upward or downward trend in the data over the two years, because this can lead to the wrong conclusions of the t test value.
you may need to u... | How to determine if there is a drop in revenue after a change in the system?
You could do a simple t test of the means of the two periods. Be sure that there is not some kind of upward or downward trend in the data over the two years, because this can lead to the wrong conclus |
40,834 | How to determine if there is a drop in revenue after a change in the system? | Nothing will be able to prove it one way or another, because even if you find revenue has dropped from that time, you will not be able to dismiss the possibility of other structural change (eg new competitor, changed regulatory environment, changed fashion, something you can't even think of...).
You can use time series... | How to determine if there is a drop in revenue after a change in the system? | Nothing will be able to prove it one way or another, because even if you find revenue has dropped from that time, you will not be able to dismiss the possibility of other structural change (eg new com | How to determine if there is a drop in revenue after a change in the system?
Nothing will be able to prove it one way or another, because even if you find revenue has dropped from that time, you will not be able to dismiss the possibility of other structural change (eg new competitor, changed regulatory environment, ch... | How to determine if there is a drop in revenue after a change in the system?
Nothing will be able to prove it one way or another, because even if you find revenue has dropped from that time, you will not be able to dismiss the possibility of other structural change (eg new com |
40,835 | How to determine if there is a drop in revenue after a change in the system? | You might consider using either CausalImpact in R to estimate the difference, but CausalImpact wants a secondary dataset (control) to compare the "treated" data - in this case website data in question.
CausalImpact requires a secondary dataset to model against the exploratory data, something like an separate but very ... | How to determine if there is a drop in revenue after a change in the system? | You might consider using either CausalImpact in R to estimate the difference, but CausalImpact wants a secondary dataset (control) to compare the "treated" data - in this case website data in question | How to determine if there is a drop in revenue after a change in the system?
You might consider using either CausalImpact in R to estimate the difference, but CausalImpact wants a secondary dataset (control) to compare the "treated" data - in this case website data in question.
CausalImpact requires a secondary datase... | How to determine if there is a drop in revenue after a change in the system?
You might consider using either CausalImpact in R to estimate the difference, but CausalImpact wants a secondary dataset (control) to compare the "treated" data - in this case website data in question |
40,836 | Variability in k-means clusters results: setting set.seed() before? | You say that set.seed doesn't work for you, but your example doesn't use set.seed so it's hard to know if you use it correctly!
This is an example close to yours that seem to work:
scores <- matrix(runif(1000), 100, 10)
set.seed(42)
k1 = kmeans(scores, 5, iter.max=500)
set.seed(42)
k2 = kmeans(scores, 5, iter.max=500... | Variability in k-means clusters results: setting set.seed() before? | You say that set.seed doesn't work for you, but your example doesn't use set.seed so it's hard to know if you use it correctly!
This is an example close to yours that seem to work:
scores <- matrix(ru | Variability in k-means clusters results: setting set.seed() before?
You say that set.seed doesn't work for you, but your example doesn't use set.seed so it's hard to know if you use it correctly!
This is an example close to yours that seem to work:
scores <- matrix(runif(1000), 100, 10)
set.seed(42)
k1 = kmeans(scores... | Variability in k-means clusters results: setting set.seed() before?
You say that set.seed doesn't work for you, but your example doesn't use set.seed so it's hard to know if you use it correctly!
This is an example close to yours that seem to work:
scores <- matrix(ru |
40,837 | Variability in k-means clusters results: setting set.seed() before? | Adding to Tommy's answer,
To identify the optimal K value for your k-means cluster , the best method is to try Elbow curve, by plotting your withinss against your K value gives you the elbow curve and select the value at elbow as the optimal K value.
https://stackoverflow.com/questions/6645895/calculating-the-percent... | Variability in k-means clusters results: setting set.seed() before? | Adding to Tommy's answer,
To identify the optimal K value for your k-means cluster , the best method is to try Elbow curve, by plotting your withinss against your K value gives you the elbow curve an | Variability in k-means clusters results: setting set.seed() before?
Adding to Tommy's answer,
To identify the optimal K value for your k-means cluster , the best method is to try Elbow curve, by plotting your withinss against your K value gives you the elbow curve and select the value at elbow as the optimal K value. ... | Variability in k-means clusters results: setting set.seed() before?
Adding to Tommy's answer,
To identify the optimal K value for your k-means cluster , the best method is to try Elbow curve, by plotting your withinss against your K value gives you the elbow curve an |
40,838 | Comparing two binary variables of unequal sizes | Chi Square doesn't require equal size groups. In R you can use either prop.test() or chisq.test().
I do this often with A/B direct mail tests with unequal size groups. For example, 100K donors are split 90% and 10%: the 90% are sent an email appeal, and 10% are sent nothing. The binary outcome is whether they do... | Comparing two binary variables of unequal sizes | Chi Square doesn't require equal size groups. In R you can use either prop.test() or chisq.test().
I do this often with A/B direct mail tests with unequal size groups. For example, 100K donors a | Comparing two binary variables of unequal sizes
Chi Square doesn't require equal size groups. In R you can use either prop.test() or chisq.test().
I do this often with A/B direct mail tests with unequal size groups. For example, 100K donors are split 90% and 10%: the 90% are sent an email appeal, and 10% are sent... | Comparing two binary variables of unequal sizes
Chi Square doesn't require equal size groups. In R you can use either prop.test() or chisq.test().
I do this often with A/B direct mail tests with unequal size groups. For example, 100K donors a |
40,839 | Comparing two binary variables of unequal sizes | You can do a two sample t-test, perhaps after transforming the proportions using e.g. the arcsine transformation. | Comparing two binary variables of unequal sizes | You can do a two sample t-test, perhaps after transforming the proportions using e.g. the arcsine transformation. | Comparing two binary variables of unequal sizes
You can do a two sample t-test, perhaps after transforming the proportions using e.g. the arcsine transformation. | Comparing two binary variables of unequal sizes
You can do a two sample t-test, perhaps after transforming the proportions using e.g. the arcsine transformation. |
40,840 | Comparing two binary variables of unequal sizes | You can actually use logistic regression / glm with the outcome as dependent variable and group belonging as explanatory factor variable. | Comparing two binary variables of unequal sizes | You can actually use logistic regression / glm with the outcome as dependent variable and group belonging as explanatory factor variable. | Comparing two binary variables of unequal sizes
You can actually use logistic regression / glm with the outcome as dependent variable and group belonging as explanatory factor variable. | Comparing two binary variables of unequal sizes
You can actually use logistic regression / glm with the outcome as dependent variable and group belonging as explanatory factor variable. |
40,841 | Comparing two binary variables of unequal sizes | Weighting by sample size is built into how the expected vaues are computed. The only thing to worry about are the rules about how small an expected value can be. | Comparing two binary variables of unequal sizes | Weighting by sample size is built into how the expected vaues are computed. The only thing to worry about are the rules about how small an expected value can be. | Comparing two binary variables of unequal sizes
Weighting by sample size is built into how the expected vaues are computed. The only thing to worry about are the rules about how small an expected value can be. | Comparing two binary variables of unequal sizes
Weighting by sample size is built into how the expected vaues are computed. The only thing to worry about are the rules about how small an expected value can be. |
40,842 | ANCOVA or repeated measures ANOVA? | Actually, the post minus pre approach is one that you should always try to avoid. The issue is not about statistics. It is about measurement. When you calculate difference scores, the reliability of the measures become very low. You don't want that.
I prefer ANCOVA if the assumptions are met (and it will in most cases)... | ANCOVA or repeated measures ANOVA? | Actually, the post minus pre approach is one that you should always try to avoid. The issue is not about statistics. It is about measurement. When you calculate difference scores, the reliability of t | ANCOVA or repeated measures ANOVA?
Actually, the post minus pre approach is one that you should always try to avoid. The issue is not about statistics. It is about measurement. When you calculate difference scores, the reliability of the measures become very low. You don't want that.
I prefer ANCOVA if the assumptions ... | ANCOVA or repeated measures ANOVA?
Actually, the post minus pre approach is one that you should always try to avoid. The issue is not about statistics. It is about measurement. When you calculate difference scores, the reliability of t |
40,843 | ANCOVA or repeated measures ANOVA? | I suspect the best approach would be to get difference scores (i.e., post - pre) for each experimental unit, and then run a simple one-way ANOVA. | ANCOVA or repeated measures ANOVA? | I suspect the best approach would be to get difference scores (i.e., post - pre) for each experimental unit, and then run a simple one-way ANOVA. | ANCOVA or repeated measures ANOVA?
I suspect the best approach would be to get difference scores (i.e., post - pre) for each experimental unit, and then run a simple one-way ANOVA. | ANCOVA or repeated measures ANOVA?
I suspect the best approach would be to get difference scores (i.e., post - pre) for each experimental unit, and then run a simple one-way ANOVA. |
40,844 | ANCOVA or repeated measures ANOVA? | I would generally say that you need a repeated measures model with group, pre_post, and an interaction term. What you want to know is whether the post-test score is dependent upon the intervention, so you need to see an interaction. The meaning of that interaction would depend on actual scores.
A simpler method might... | ANCOVA or repeated measures ANOVA? | I would generally say that you need a repeated measures model with group, pre_post, and an interaction term. What you want to know is whether the post-test score is dependent upon the intervention, s | ANCOVA or repeated measures ANOVA?
I would generally say that you need a repeated measures model with group, pre_post, and an interaction term. What you want to know is whether the post-test score is dependent upon the intervention, so you need to see an interaction. The meaning of that interaction would depend on ac... | ANCOVA or repeated measures ANOVA?
I would generally say that you need a repeated measures model with group, pre_post, and an interaction term. What you want to know is whether the post-test score is dependent upon the intervention, s |
40,845 | ANCOVA or repeated measures ANOVA? | ANCOVA gives the same results asymptotically as the contrained repeated measures model (no treatment main effect term). The usual repeated measures model including time, treatment, time*treatment terms assumes the baseline scores are not balanced so its estimator is less efficient.
Article:
https://www.researchgate.n... | ANCOVA or repeated measures ANOVA? | ANCOVA gives the same results asymptotically as the contrained repeated measures model (no treatment main effect term). The usual repeated measures model including time, treatment, time*treatment term | ANCOVA or repeated measures ANOVA?
ANCOVA gives the same results asymptotically as the contrained repeated measures model (no treatment main effect term). The usual repeated measures model including time, treatment, time*treatment terms assumes the baseline scores are not balanced so its estimator is less efficient.
A... | ANCOVA or repeated measures ANOVA?
ANCOVA gives the same results asymptotically as the contrained repeated measures model (no treatment main effect term). The usual repeated measures model including time, treatment, time*treatment term |
40,846 | Convergence in probability and $L_2$ for normal random variables | Unfortunately, the quoted statement in the question is a muddled version of the one I originally intended. Thank you for catching this. I've also updated the statement in the original question. A counterexample to the former is given at the end of this answer.
Here is the intended statement:
Lemma: Let $X_1,X_2,\ldots$... | Convergence in probability and $L_2$ for normal random variables | Unfortunately, the quoted statement in the question is a muddled version of the one I originally intended. Thank you for catching this. I've also updated the statement in the original question. A coun | Convergence in probability and $L_2$ for normal random variables
Unfortunately, the quoted statement in the question is a muddled version of the one I originally intended. Thank you for catching this. I've also updated the statement in the original question. A counterexample to the former is given at the end of this an... | Convergence in probability and $L_2$ for normal random variables
Unfortunately, the quoted statement in the question is a muddled version of the one I originally intended. Thank you for catching this. I've also updated the statement in the original question. A coun |
40,847 | Gower's (dis)similarity index | Gower dissimilarity is just 1 minus Gower similarity, $1-GS$. So, they are "the same", and limitations of one are the limitations of the other.
Ward clustering computes cluster centroids and in order for those to be geometrically "real" it demands (squared) euclidean distances as its input. Euclidean distance is metric... | Gower's (dis)similarity index | Gower dissimilarity is just 1 minus Gower similarity, $1-GS$. So, they are "the same", and limitations of one are the limitations of the other.
Ward clustering computes cluster centroids and in order | Gower's (dis)similarity index
Gower dissimilarity is just 1 minus Gower similarity, $1-GS$. So, they are "the same", and limitations of one are the limitations of the other.
Ward clustering computes cluster centroids and in order for those to be geometrically "real" it demands (squared) euclidean distances as its input... | Gower's (dis)similarity index
Gower dissimilarity is just 1 minus Gower similarity, $1-GS$. So, they are "the same", and limitations of one are the limitations of the other.
Ward clustering computes cluster centroids and in order |
40,848 | Gower's (dis)similarity index | I'm a little puzzled by the answer above because of the following paragraph from Gower (1971):
POSITIVE SEMI-DEFINITE PROPERTY OF THE SIMILARITY MATRIX
With n individuals, the n X n matrix S can be formed whose element Sij is the similarity, as described in section 2, between individuals i and j. We often require t... | Gower's (dis)similarity index | I'm a little puzzled by the answer above because of the following paragraph from Gower (1971):
POSITIVE SEMI-DEFINITE PROPERTY OF THE SIMILARITY MATRIX
With n individuals, the n X n matrix S can be | Gower's (dis)similarity index
I'm a little puzzled by the answer above because of the following paragraph from Gower (1971):
POSITIVE SEMI-DEFINITE PROPERTY OF THE SIMILARITY MATRIX
With n individuals, the n X n matrix S can be formed whose element Sij is the similarity, as described in section 2, between individua... | Gower's (dis)similarity index
I'm a little puzzled by the answer above because of the following paragraph from Gower (1971):
POSITIVE SEMI-DEFINITE PROPERTY OF THE SIMILARITY MATRIX
With n individuals, the n X n matrix S can be |
40,849 | Max Entropy Solver in R | Making the change of variables $x = l + (u-l)y$ puts the problem into the same form with $u=1, l=0$. Rewrite the density in the form $f(x,\nu,\tau)=\exp(-1/2((x-\nu)\tau)^2)/(\sqrt{2\pi}\tau)$ and rewrite the equations as
$$\eqalign{
\int_0^1 x f(x,\nu,\tau) dx &= \mu \int_0^1 f(x,\nu,\tau)\\
\int_0^1 x^2 f(x,\nu,\... | Max Entropy Solver in R | Making the change of variables $x = l + (u-l)y$ puts the problem into the same form with $u=1, l=0$. Rewrite the density in the form $f(x,\nu,\tau)=\exp(-1/2((x-\nu)\tau)^2)/(\sqrt{2\pi}\tau)$ and re | Max Entropy Solver in R
Making the change of variables $x = l + (u-l)y$ puts the problem into the same form with $u=1, l=0$. Rewrite the density in the form $f(x,\nu,\tau)=\exp(-1/2((x-\nu)\tau)^2)/(\sqrt{2\pi}\tau)$ and rewrite the equations as
$$\eqalign{
\int_0^1 x f(x,\nu,\tau) dx &= \mu \int_0^1 f(x,\nu,\tau)\... | Max Entropy Solver in R
Making the change of variables $x = l + (u-l)y$ puts the problem into the same form with $u=1, l=0$. Rewrite the density in the form $f(x,\nu,\tau)=\exp(-1/2((x-\nu)\tau)^2)/(\sqrt{2\pi}\tau)$ and re |
40,850 | Can compressed sensing be applied to data mining? | Yes, compressed sensing can be used for data mining when the data are sparse. For example, see Calderbank et al. Compressed Learning.
The intuition is that if the data are sparse then one can perfectly reconstruct the data w.h.p from its randomly projected representation, provided that the projection dimension, $k$, sa... | Can compressed sensing be applied to data mining? | Yes, compressed sensing can be used for data mining when the data are sparse. For example, see Calderbank et al. Compressed Learning.
The intuition is that if the data are sparse then one can perfectl | Can compressed sensing be applied to data mining?
Yes, compressed sensing can be used for data mining when the data are sparse. For example, see Calderbank et al. Compressed Learning.
The intuition is that if the data are sparse then one can perfectly reconstruct the data w.h.p from its randomly projected representatio... | Can compressed sensing be applied to data mining?
Yes, compressed sensing can be used for data mining when the data are sparse. For example, see Calderbank et al. Compressed Learning.
The intuition is that if the data are sparse then one can perfectl |
40,851 | Reference for generalized linear mixed models using Laplace approximation | Here are some papers:
Breslow and Clayton, 1993: Approximate Inference in Generalized Linear Mixed Models.
Tierney and Kadane, 1986: Accurate Approximations for Posterior Moments and Marginal Densities.
Breslow, 2003: Whither PQL?.
Tuerlinckx, et al. 2006: Statistical Inference in generalized linear mixed models: A re... | Reference for generalized linear mixed models using Laplace approximation | Here are some papers:
Breslow and Clayton, 1993: Approximate Inference in Generalized Linear Mixed Models.
Tierney and Kadane, 1986: Accurate Approximations for Posterior Moments and Marginal Densiti | Reference for generalized linear mixed models using Laplace approximation
Here are some papers:
Breslow and Clayton, 1993: Approximate Inference in Generalized Linear Mixed Models.
Tierney and Kadane, 1986: Accurate Approximations for Posterior Moments and Marginal Densities.
Breslow, 2003: Whither PQL?.
Tuerlinckx, e... | Reference for generalized linear mixed models using Laplace approximation
Here are some papers:
Breslow and Clayton, 1993: Approximate Inference in Generalized Linear Mixed Models.
Tierney and Kadane, 1986: Accurate Approximations for Posterior Moments and Marginal Densiti |
40,852 | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression | According to Wooldridge 2009 (p. 192), the log(1 + x) transformation may retain the usual interpretation of log(x):
In cases where a variable $y$ is nonnegative but can take on the value 0, $log(1+y)$ is sometimes used. The percentage change interpretations are often closely preserved, except for changes beginning at... | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression | According to Wooldridge 2009 (p. 192), the log(1 + x) transformation may retain the usual interpretation of log(x):
In cases where a variable $y$ is nonnegative but can take on the value 0, $log(1+y | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression
According to Wooldridge 2009 (p. 192), the log(1 + x) transformation may retain the usual interpretation of log(x):
In cases where a variable $y$ is nonnegative but can take on the value 0, $log(1+y)$ is sometimes used. The ... | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression
According to Wooldridge 2009 (p. 192), the log(1 + x) transformation may retain the usual interpretation of log(x):
In cases where a variable $y$ is nonnegative but can take on the value 0, $log(1+y |
40,853 | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression | For $0 < x \ll 1$, $\log(1+x) \approx x$. For $x \gg 1$, $\log(1+x) \approx \log(x)$. When $x$ is much smaller or much bigger than 1 you can use those equations to get your interpretation.
As a side note: when applying transforms to your data, you should be concerned less about normality of X and Y in distribution, and... | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression | For $0 < x \ll 1$, $\log(1+x) \approx x$. For $x \gg 1$, $\log(1+x) \approx \log(x)$. When $x$ is much smaller or much bigger than 1 you can use those equations to get your interpretation.
As a side n | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression
For $0 < x \ll 1$, $\log(1+x) \approx x$. For $x \gg 1$, $\log(1+x) \approx \log(x)$. When $x$ is much smaller or much bigger than 1 you can use those equations to get your interpretation.
As a side note: when applying transfo... | Back-transformation and interpretation of $\log(X+1)$ estimates in multiple linear regression
For $0 < x \ll 1$, $\log(1+x) \approx x$. For $x \gg 1$, $\log(1+x) \approx \log(x)$. When $x$ is much smaller or much bigger than 1 you can use those equations to get your interpretation.
As a side n |
40,854 | How do I parameterize a Weibull distribution in JAGS / BUGS? | Doing the algebra, we have $\lambda= (1/b)^a$ (by equating the constant term within the exponent): since $a=\nu$, this is consistent with $a (1/b)^{a} = \nu \lambda$. You're right that my answer elsewhere is wrong; feel free to edit it yourself if I don't get around to it sooner (at least the link is there to warn peo... | How do I parameterize a Weibull distribution in JAGS / BUGS? | Doing the algebra, we have $\lambda= (1/b)^a$ (by equating the constant term within the exponent): since $a=\nu$, this is consistent with $a (1/b)^{a} = \nu \lambda$. You're right that my answer else | How do I parameterize a Weibull distribution in JAGS / BUGS?
Doing the algebra, we have $\lambda= (1/b)^a$ (by equating the constant term within the exponent): since $a=\nu$, this is consistent with $a (1/b)^{a} = \nu \lambda$. You're right that my answer elsewhere is wrong; feel free to edit it yourself if I don't ge... | How do I parameterize a Weibull distribution in JAGS / BUGS?
Doing the algebra, we have $\lambda= (1/b)^a$ (by equating the constant term within the exponent): since $a=\nu$, this is consistent with $a (1/b)^{a} = \nu \lambda$. You're right that my answer else |
40,855 | Simulated annealing and k-means | It sounds like you're carrying out a cluster analysis on a dataset that has a pretty large number of variables; having difficulty obtaining good results because of the large number of variables (the curse of dimensionality, as you mention); and you're considering using an optimization technique such as simulated anneal... | Simulated annealing and k-means | It sounds like you're carrying out a cluster analysis on a dataset that has a pretty large number of variables; having difficulty obtaining good results because of the large number of variables (the c | Simulated annealing and k-means
It sounds like you're carrying out a cluster analysis on a dataset that has a pretty large number of variables; having difficulty obtaining good results because of the large number of variables (the curse of dimensionality, as you mention); and you're considering using an optimization te... | Simulated annealing and k-means
It sounds like you're carrying out a cluster analysis on a dataset that has a pretty large number of variables; having difficulty obtaining good results because of the large number of variables (the c |
40,856 | Simulated annealing and k-means | Simulated Annealing is heuristic search optimization algorithm.
You need to define a loss function.
SA will optimize this and will converge to local minumum.
K-means clustering by definition also includes optimization.
It minimizes instances' distance to cluster centers.
This distance can be eucledean or manhattan d... | Simulated annealing and k-means | Simulated Annealing is heuristic search optimization algorithm.
You need to define a loss function.
SA will optimize this and will converge to local minumum.
K-means clustering by definition also in | Simulated annealing and k-means
Simulated Annealing is heuristic search optimization algorithm.
You need to define a loss function.
SA will optimize this and will converge to local minumum.
K-means clustering by definition also includes optimization.
It minimizes instances' distance to cluster centers.
This distance... | Simulated annealing and k-means
Simulated Annealing is heuristic search optimization algorithm.
You need to define a loss function.
SA will optimize this and will converge to local minumum.
K-means clustering by definition also in |
40,857 | Desired effect size vs. expected effect size | There are many ways to perform power calculations to determine the ideal sample size. One such way, as you mention, is to pick a threshold value of "Someone will care". This may be governed by prior knowledge, the belief that your field doesn't particular get interested until an effect is of a particular size, etc.
My ... | Desired effect size vs. expected effect size | There are many ways to perform power calculations to determine the ideal sample size. One such way, as you mention, is to pick a threshold value of "Someone will care". This may be governed by prior k | Desired effect size vs. expected effect size
There are many ways to perform power calculations to determine the ideal sample size. One such way, as you mention, is to pick a threshold value of "Someone will care". This may be governed by prior knowledge, the belief that your field doesn't particular get interested unti... | Desired effect size vs. expected effect size
There are many ways to perform power calculations to determine the ideal sample size. One such way, as you mention, is to pick a threshold value of "Someone will care". This may be governed by prior k |
40,858 | Desired effect size vs. expected effect size | @EpiGrad makes some nice points here. I thought I would throw in one extra bit of information. He mentions that power analyses are often optimistic, and you mention that it is often suggested to estimate the effect size you want to capture from a pilot analysis. I just want to make it explicit, that this procedure i... | Desired effect size vs. expected effect size | @EpiGrad makes some nice points here. I thought I would throw in one extra bit of information. He mentions that power analyses are often optimistic, and you mention that it is often suggested to est | Desired effect size vs. expected effect size
@EpiGrad makes some nice points here. I thought I would throw in one extra bit of information. He mentions that power analyses are often optimistic, and you mention that it is often suggested to estimate the effect size you want to capture from a pilot analysis. I just wa... | Desired effect size vs. expected effect size
@EpiGrad makes some nice points here. I thought I would throw in one extra bit of information. He mentions that power analyses are often optimistic, and you mention that it is often suggested to est |
40,859 | Probability of circles intersecting | I can see many possible approaches, but let me outline one approach that I think might be effective and might give reasonable accuracy with a reasonable amount of effort. It uses Monte Carlo simulation, independence, and linearity of expectation. I'm going to break it down into bite-sized pieces, by identifying a set... | Probability of circles intersecting | I can see many possible approaches, but let me outline one approach that I think might be effective and might give reasonable accuracy with a reasonable amount of effort. It uses Monte Carlo simulati | Probability of circles intersecting
I can see many possible approaches, but let me outline one approach that I think might be effective and might give reasonable accuracy with a reasonable amount of effort. It uses Monte Carlo simulation, independence, and linearity of expectation. I'm going to break it down into bit... | Probability of circles intersecting
I can see many possible approaches, but let me outline one approach that I think might be effective and might give reasonable accuracy with a reasonable amount of effort. It uses Monte Carlo simulati |
40,860 | GDA and LDA terminology | According to Wikipedia:
"The terms Fisher's linear discriminant and LDA are often used interchangeably, although Fisher's original article actually describes a slightly different discriminant, which does not make some of the assumptions of LDA such as normally distributed classes or equal class covariances."
LDA is e... | GDA and LDA terminology | According to Wikipedia:
"The terms Fisher's linear discriminant and LDA are often used interchangeably, although Fisher's original article actually describes a slightly different discriminant, which | GDA and LDA terminology
According to Wikipedia:
"The terms Fisher's linear discriminant and LDA are often used interchangeably, although Fisher's original article actually describes a slightly different discriminant, which does not make some of the assumptions of LDA such as normally distributed classes or equal class... | GDA and LDA terminology
According to Wikipedia:
"The terms Fisher's linear discriminant and LDA are often used interchangeably, although Fisher's original article actually describes a slightly different discriminant, which |
40,861 | GDA and LDA terminology | GDA (Gaussian Dcriminant Analysis) is a general term for both LDA (Linear Discriminant Analysis) and QDA (Quadratic Discriminant Analysis) where the likelihood probability of each observation given the class, i.e., P(x|y) can be modeled by the multivariate Gaussian distribution.
Here, x is a n-dimensional observation r... | GDA and LDA terminology | GDA (Gaussian Dcriminant Analysis) is a general term for both LDA (Linear Discriminant Analysis) and QDA (Quadratic Discriminant Analysis) where the likelihood probability of each observation given th | GDA and LDA terminology
GDA (Gaussian Dcriminant Analysis) is a general term for both LDA (Linear Discriminant Analysis) and QDA (Quadratic Discriminant Analysis) where the likelihood probability of each observation given the class, i.e., P(x|y) can be modeled by the multivariate Gaussian distribution.
Here, x is a n-d... | GDA and LDA terminology
GDA (Gaussian Dcriminant Analysis) is a general term for both LDA (Linear Discriminant Analysis) and QDA (Quadratic Discriminant Analysis) where the likelihood probability of each observation given th |
40,862 | GDA and LDA terminology | In the theory of classification the linear form of the discriminant function is optimal when the class conditional densities are Gaussian with the same covariance matrix. So in that sense I could understand the term Gaussian sneaking in as a term for LDA. However QDA quadratic discrimination is optimal when the class... | GDA and LDA terminology | In the theory of classification the linear form of the discriminant function is optimal when the class conditional densities are Gaussian with the same covariance matrix. So in that sense I could und | GDA and LDA terminology
In the theory of classification the linear form of the discriminant function is optimal when the class conditional densities are Gaussian with the same covariance matrix. So in that sense I could understand the term Gaussian sneaking in as a term for LDA. However QDA quadratic discrimination i... | GDA and LDA terminology
In the theory of classification the linear form of the discriminant function is optimal when the class conditional densities are Gaussian with the same covariance matrix. So in that sense I could und |
40,863 | Statistics on mathematical "data"? | Any time you do computer simulations to evaluate the performance of a statistical method (eg, power), you are approximating a calculation that might conceivably be calculated analytically (power is a probability). You could also conceive of doing exact-ish numerical calculations: summing exhaustively across all possib... | Statistics on mathematical "data"? | Any time you do computer simulations to evaluate the performance of a statistical method (eg, power), you are approximating a calculation that might conceivably be calculated analytically (power is a | Statistics on mathematical "data"?
Any time you do computer simulations to evaluate the performance of a statistical method (eg, power), you are approximating a calculation that might conceivably be calculated analytically (power is a probability). You could also conceive of doing exact-ish numerical calculations: sum... | Statistics on mathematical "data"?
Any time you do computer simulations to evaluate the performance of a statistical method (eg, power), you are approximating a calculation that might conceivably be calculated analytically (power is a |
40,864 | Statistics on mathematical "data"? | This is akin (Update: see below) to methods used in automated probabilistic proof systems or cryptographic verification systems. An example would be a zero knowledge proof.
Several other areas to explore:
Interactive proof systems
Probabilistically checkable proofs
In general, one does not try to do statistical ana... | Statistics on mathematical "data"? | This is akin (Update: see below) to methods used in automated probabilistic proof systems or cryptographic verification systems. An example would be a zero knowledge proof.
Several other areas to exp | Statistics on mathematical "data"?
This is akin (Update: see below) to methods used in automated probabilistic proof systems or cryptographic verification systems. An example would be a zero knowledge proof.
Several other areas to explore:
Interactive proof systems
Probabilistically checkable proofs
In general, one... | Statistics on mathematical "data"?
This is akin (Update: see below) to methods used in automated probabilistic proof systems or cryptographic verification systems. An example would be a zero knowledge proof.
Several other areas to exp |
40,865 | Algorithms to eliminate or display outliers in a dataset | Outliers are usually removed for analysis (fitting a model), not for visualization, where you can just change your focus so the outliers are out of view.
The plots you mention, parallel coordinate chart and a scatterplot matrix, should be fine since each variable has its own scale. If your software forces all scales to... | Algorithms to eliminate or display outliers in a dataset | Outliers are usually removed for analysis (fitting a model), not for visualization, where you can just change your focus so the outliers are out of view.
The plots you mention, parallel coordinate cha | Algorithms to eliminate or display outliers in a dataset
Outliers are usually removed for analysis (fitting a model), not for visualization, where you can just change your focus so the outliers are out of view.
The plots you mention, parallel coordinate chart and a scatterplot matrix, should be fine since each variable... | Algorithms to eliminate or display outliers in a dataset
Outliers are usually removed for analysis (fitting a model), not for visualization, where you can just change your focus so the outliers are out of view.
The plots you mention, parallel coordinate cha |
40,866 | Algorithms to eliminate or display outliers in a dataset | Here is how I would go about doing it in SQL Server.
The query below will get the average weight from a fictional Scale table holding a single weigh-in for each person while not permitting those who are overly fat or thin to throw off the more realistic average:
select w.Gender, Avg(w.Weight) as AvgWeight
from Scal... | Algorithms to eliminate or display outliers in a dataset | Here is how I would go about doing it in SQL Server.
The query below will get the average weight from a fictional Scale table holding a single weigh-in for each person while not permitting those who a | Algorithms to eliminate or display outliers in a dataset
Here is how I would go about doing it in SQL Server.
The query below will get the average weight from a fictional Scale table holding a single weigh-in for each person while not permitting those who are overly fat or thin to throw off the more realistic average:
... | Algorithms to eliminate or display outliers in a dataset
Here is how I would go about doing it in SQL Server.
The query below will get the average weight from a fictional Scale table holding a single weigh-in for each person while not permitting those who a |
40,867 | Classifying IP addresses with a decision tree | As a Postmaster I find this not only a really cool problem, but a daily problem in my work. So I have a few questions for you:
Is your dataset comprised only of IPv4 addresses?
Is your dataset comprised of "known" spam address blocks, or just addresses that may belong to a botnet?
Besides using IP addresses as ordered... | Classifying IP addresses with a decision tree | As a Postmaster I find this not only a really cool problem, but a daily problem in my work. So I have a few questions for you:
Is your dataset comprised only of IPv4 addresses?
Is your dataset compri | Classifying IP addresses with a decision tree
As a Postmaster I find this not only a really cool problem, but a daily problem in my work. So I have a few questions for you:
Is your dataset comprised only of IPv4 addresses?
Is your dataset comprised of "known" spam address blocks, or just addresses that may belong to a... | Classifying IP addresses with a decision tree
As a Postmaster I find this not only a really cool problem, but a daily problem in my work. So I have a few questions for you:
Is your dataset comprised only of IPv4 addresses?
Is your dataset compri |
40,868 | Classifying IP addresses with a decision tree | The general rule for trees is that you shouldn't expect them to do anything with an order of attributes because they cannot "see" it. Moreover the attributes should be somewhat "orthogonal" description of the objects.
Thus I think you should rather use some descriptors of IPs, like country, provider, commercial/home (p... | Classifying IP addresses with a decision tree | The general rule for trees is that you shouldn't expect them to do anything with an order of attributes because they cannot "see" it. Moreover the attributes should be somewhat "orthogonal" descriptio | Classifying IP addresses with a decision tree
The general rule for trees is that you shouldn't expect them to do anything with an order of attributes because they cannot "see" it. Moreover the attributes should be somewhat "orthogonal" description of the objects.
Thus I think you should rather use some descriptors of I... | Classifying IP addresses with a decision tree
The general rule for trees is that you shouldn't expect them to do anything with an order of attributes because they cannot "see" it. Moreover the attributes should be somewhat "orthogonal" descriptio |
40,869 | Classifying IP addresses with a decision tree | Admittedly two years since you asked this question..., but this article is just too perfect to not share here. Here is your answer and algorithm. Well, at least when they made it, although if you check out the authors they have personal webpages with more work in the same area.
This is how Microsoft did it or began t... | Classifying IP addresses with a decision tree | Admittedly two years since you asked this question..., but this article is just too perfect to not share here. Here is your answer and algorithm. Well, at least when they made it, although if you ch | Classifying IP addresses with a decision tree
Admittedly two years since you asked this question..., but this article is just too perfect to not share here. Here is your answer and algorithm. Well, at least when they made it, although if you check out the authors they have personal webpages with more work in the same... | Classifying IP addresses with a decision tree
Admittedly two years since you asked this question..., but this article is just too perfect to not share here. Here is your answer and algorithm. Well, at least when they made it, although if you ch |
40,870 | Classifying IP addresses with a decision tree | It sounds like you're whacking a mole with a nuclear bomb there, why not just:
1.) Sort all the IP addresses
2.) Do a sliding window over all of them where if one of them is marked spam, the ones before it get a probability associated with them, and the ones after it do as well
3.) Make the probability weights you're a... | Classifying IP addresses with a decision tree | It sounds like you're whacking a mole with a nuclear bomb there, why not just:
1.) Sort all the IP addresses
2.) Do a sliding window over all of them where if one of them is marked spam, the ones befo | Classifying IP addresses with a decision tree
It sounds like you're whacking a mole with a nuclear bomb there, why not just:
1.) Sort all the IP addresses
2.) Do a sliding window over all of them where if one of them is marked spam, the ones before it get a probability associated with them, and the ones after it do as ... | Classifying IP addresses with a decision tree
It sounds like you're whacking a mole with a nuclear bomb there, why not just:
1.) Sort all the IP addresses
2.) Do a sliding window over all of them where if one of them is marked spam, the ones befo |
40,871 | Fitting a beta-binomial model in the case of overdispersion in R | Beta binomial does sound like a good choice. Ben Bolker has a nice example of how to do it with his bbmle package here. I believe his book has more, some kind of tadpole-related example. You can get preprints of the book here. Hope this helps! | Fitting a beta-binomial model in the case of overdispersion in R | Beta binomial does sound like a good choice. Ben Bolker has a nice example of how to do it with his bbmle package here. I believe his book has more, some kind of tadpole-related example. You can get p | Fitting a beta-binomial model in the case of overdispersion in R
Beta binomial does sound like a good choice. Ben Bolker has a nice example of how to do it with his bbmle package here. I believe his book has more, some kind of tadpole-related example. You can get preprints of the book here. Hope this helps! | Fitting a beta-binomial model in the case of overdispersion in R
Beta binomial does sound like a good choice. Ben Bolker has a nice example of how to do it with his bbmle package here. I believe his book has more, some kind of tadpole-related example. You can get p |
40,872 | Probability of a certain sum of values from a set of dice rolls | In the comments to Glen's answer you seem to have used a normal approximation pnorm(300, 350, sqrt(3500/12)) to get 0.001707396. This is not a bad answer, though you can do better.
If you used the continuity correction the continuity correction pnorm(299.5, 350, sqrt(3500/12)) you would get 0.001553355. I suspect thi... | Probability of a certain sum of values from a set of dice rolls | In the comments to Glen's answer you seem to have used a normal approximation pnorm(300, 350, sqrt(3500/12)) to get 0.001707396. This is not a bad answer, though you can do better.
If you used the co | Probability of a certain sum of values from a set of dice rolls
In the comments to Glen's answer you seem to have used a normal approximation pnorm(300, 350, sqrt(3500/12)) to get 0.001707396. This is not a bad answer, though you can do better.
If you used the continuity correction the continuity correction pnorm(299.... | Probability of a certain sum of values from a set of dice rolls
In the comments to Glen's answer you seem to have used a normal approximation pnorm(300, 350, sqrt(3500/12)) to get 0.001707396. This is not a bad answer, though you can do better.
If you used the co |
40,873 | Probability of a certain sum of values from a set of dice rolls | Due to the CLT, a sum of i.i.d. random variables is distributed:
$$
\sum_{i=1}^nX_i \sim N\left(\mu =n\cdot\mu_{X_i},\sigma^2 = n\cdot\sigma^2_{X_i}\right)
$$
The mean of a single dice roll ($X_i$) is 3.5 and the variance is 35/12.
That should help you find the answer. | Probability of a certain sum of values from a set of dice rolls | Due to the CLT, a sum of i.i.d. random variables is distributed:
$$
\sum_{i=1}^nX_i \sim N\left(\mu =n\cdot\mu_{X_i},\sigma^2 = n\cdot\sigma^2_{X_i}\right)
$$
The mean of a single dice roll ($X_i$) | Probability of a certain sum of values from a set of dice rolls
Due to the CLT, a sum of i.i.d. random variables is distributed:
$$
\sum_{i=1}^nX_i \sim N\left(\mu =n\cdot\mu_{X_i},\sigma^2 = n\cdot\sigma^2_{X_i}\right)
$$
The mean of a single dice roll ($X_i$) is 3.5 and the variance is 35/12.
That should help you f... | Probability of a certain sum of values from a set of dice rolls
Due to the CLT, a sum of i.i.d. random variables is distributed:
$$
\sum_{i=1}^nX_i \sim N\left(\mu =n\cdot\mu_{X_i},\sigma^2 = n\cdot\sigma^2_{X_i}\right)
$$
The mean of a single dice roll ($X_i$) |
40,874 | Difference in means in multiple-choice poll | Find out if there's any difference at all through Pearson's Chi Square. If this turns out significant, then do a (set of) post-hoc test(s), e.g. Tukey's HSD. | Difference in means in multiple-choice poll | Find out if there's any difference at all through Pearson's Chi Square. If this turns out significant, then do a (set of) post-hoc test(s), e.g. Tukey's HSD. | Difference in means in multiple-choice poll
Find out if there's any difference at all through Pearson's Chi Square. If this turns out significant, then do a (set of) post-hoc test(s), e.g. Tukey's HSD. | Difference in means in multiple-choice poll
Find out if there's any difference at all through Pearson's Chi Square. If this turns out significant, then do a (set of) post-hoc test(s), e.g. Tukey's HSD. |
40,875 | Difference in means in multiple-choice poll | You would need to use the "Simultaneous Score Intervals for Difference of Proportions" to solve your question. The reference is " Agresti et al. 2008. Simultaneous confidence interval for comparing binomial parameters. Biometrics 64, 1270-1275.
The corresponding R code is available in http://www.stat.ufl.edu/~aa/cda/s... | Difference in means in multiple-choice poll | You would need to use the "Simultaneous Score Intervals for Difference of Proportions" to solve your question. The reference is " Agresti et al. 2008. Simultaneous confidence interval for comparing bi | Difference in means in multiple-choice poll
You would need to use the "Simultaneous Score Intervals for Difference of Proportions" to solve your question. The reference is " Agresti et al. 2008. Simultaneous confidence interval for comparing binomial parameters. Biometrics 64, 1270-1275.
The corresponding R code is av... | Difference in means in multiple-choice poll
You would need to use the "Simultaneous Score Intervals for Difference of Proportions" to solve your question. The reference is " Agresti et al. 2008. Simultaneous confidence interval for comparing bi |
40,876 | Centroid matching problem | Because K-means minimizes variances, a good criterion is to minimize the sum of squared distances between the pairs of points.
This is an integral (0/1) linear program. Specifically, the pairing can be specified by a matrix $\Lambda = (\lambda_{ij})$ where $\lambda_{ij} = 1$ if $c_i$ is paired with $k_j$ and $\lambda_... | Centroid matching problem | Because K-means minimizes variances, a good criterion is to minimize the sum of squared distances between the pairs of points.
This is an integral (0/1) linear program. Specifically, the pairing can | Centroid matching problem
Because K-means minimizes variances, a good criterion is to minimize the sum of squared distances between the pairs of points.
This is an integral (0/1) linear program. Specifically, the pairing can be specified by a matrix $\Lambda = (\lambda_{ij})$ where $\lambda_{ij} = 1$ if $c_i$ is paire... | Centroid matching problem
Because K-means minimizes variances, a good criterion is to minimize the sum of squared distances between the pairs of points.
This is an integral (0/1) linear program. Specifically, the pairing can |
40,877 | Centroid matching problem | The problem you're trying to solve is a min-cost matching problem, specifically the problem of minimizing the functional
$F(\pi) = \sum_i \|c_i - k_{\pi(i)}\|^2 $
where $\pi$ is over all permutations in $S_n$.
This can be solved by the Hungarian algorithm (which is a primal-dual method in disguise) and takes $n^3$ ti... | Centroid matching problem | The problem you're trying to solve is a min-cost matching problem, specifically the problem of minimizing the functional
$F(\pi) = \sum_i \|c_i - k_{\pi(i)}\|^2 $
where $\pi$ is over all permutations | Centroid matching problem
The problem you're trying to solve is a min-cost matching problem, specifically the problem of minimizing the functional
$F(\pi) = \sum_i \|c_i - k_{\pi(i)}\|^2 $
where $\pi$ is over all permutations in $S_n$.
This can be solved by the Hungarian algorithm (which is a primal-dual method in di... | Centroid matching problem
The problem you're trying to solve is a min-cost matching problem, specifically the problem of minimizing the functional
$F(\pi) = \sum_i \|c_i - k_{\pi(i)}\|^2 $
where $\pi$ is over all permutations |
40,878 | Centroid matching problem | Sounds like you might want to consider using/writing an energy function. More here: http://en.wikipedia.org/wiki/Optimization_%28mathematics%29#Multi-objective_optimization
I suppose if your number of k centroids is "small" you can run a distance function for all c k pairings and select the set which minimizes total... | Centroid matching problem | Sounds like you might want to consider using/writing an energy function. More here: http://en.wikipedia.org/wiki/Optimization_%28mathematics%29#Multi-objective_optimization
I suppose if your number | Centroid matching problem
Sounds like you might want to consider using/writing an energy function. More here: http://en.wikipedia.org/wiki/Optimization_%28mathematics%29#Multi-objective_optimization
I suppose if your number of k centroids is "small" you can run a distance function for all c k pairings and select the... | Centroid matching problem
Sounds like you might want to consider using/writing an energy function. More here: http://en.wikipedia.org/wiki/Optimization_%28mathematics%29#Multi-objective_optimization
I suppose if your number |
40,879 | Plotting multiple binhex with the same z levels | Have you thought about using the faceting capabilities within ggplot2 directly? You can allow for free scales as a parameter in the call to facet_wrap(). Here's an example for you:
library(ggplot2)
library(hexbin)
#Sample data.frame.
dat <- data.frame(
rating = sample(500:2500, 1000, TRUE)
, Solar.Radiation = sampl... | Plotting multiple binhex with the same z levels | Have you thought about using the faceting capabilities within ggplot2 directly? You can allow for free scales as a parameter in the call to facet_wrap(). Here's an example for you:
library(ggplot2)
li | Plotting multiple binhex with the same z levels
Have you thought about using the faceting capabilities within ggplot2 directly? You can allow for free scales as a parameter in the call to facet_wrap(). Here's an example for you:
library(ggplot2)
library(hexbin)
#Sample data.frame.
dat <- data.frame(
rating = sample(5... | Plotting multiple binhex with the same z levels
Have you thought about using the faceting capabilities within ggplot2 directly? You can allow for free scales as a parameter in the call to facet_wrap(). Here's an example for you:
library(ggplot2)
li |
40,880 | Linear model with random coefficient | I will try to answer the questions 2 to 4. Suppose that we observe sample $(y_i,\mathbf{x}_i,z_i,\gamma_i,\varepsilon_i)$. Suppose that our model is
$$y_i=\mathbf{x}_i\beta+\gamma_iz_i+\varepsilon_i$$
and
$$E(\varepsilon_i|\mathbf{x}_i,z_i,\gamma_i)=0.$$
The least squares estimate of the regression will be
\begin{al... | Linear model with random coefficient | I will try to answer the questions 2 to 4. Suppose that we observe sample $(y_i,\mathbf{x}_i,z_i,\gamma_i,\varepsilon_i)$. Suppose that our model is
$$y_i=\mathbf{x}_i\beta+\gamma_iz_i+\varepsilon_i$ | Linear model with random coefficient
I will try to answer the questions 2 to 4. Suppose that we observe sample $(y_i,\mathbf{x}_i,z_i,\gamma_i,\varepsilon_i)$. Suppose that our model is
$$y_i=\mathbf{x}_i\beta+\gamma_iz_i+\varepsilon_i$$
and
$$E(\varepsilon_i|\mathbf{x}_i,z_i,\gamma_i)=0.$$
The least squares estimat... | Linear model with random coefficient
I will try to answer the questions 2 to 4. Suppose that we observe sample $(y_i,\mathbf{x}_i,z_i,\gamma_i,\varepsilon_i)$. Suppose that our model is
$$y_i=\mathbf{x}_i\beta+\gamma_iz_i+\varepsilon_i$ |
40,881 | Linear model with random coefficient | Maybe I'm missing something here, but couldn't you rearrange the equation and do a logit or probit analysis on gamma? | Linear model with random coefficient | Maybe I'm missing something here, but couldn't you rearrange the equation and do a logit or probit analysis on gamma? | Linear model with random coefficient
Maybe I'm missing something here, but couldn't you rearrange the equation and do a logit or probit analysis on gamma? | Linear model with random coefficient
Maybe I'm missing something here, but couldn't you rearrange the equation and do a logit or probit analysis on gamma? |
40,882 | Is the matrix dimension important for performing a valid PCA? | PCA of variables. Number of observations n is low relative to number of variables.
1) Mathematical aspect. Whenever n<=m correlation matrix is singular which means some of last m principle components are zero-variance, that is, they are not existant. This is not a problem to PCA, generally speaking, since you could jus... | Is the matrix dimension important for performing a valid PCA? | PCA of variables. Number of observations n is low relative to number of variables.
1) Mathematical aspect. Whenever n<=m correlation matrix is singular which means some of last m principle components | Is the matrix dimension important for performing a valid PCA?
PCA of variables. Number of observations n is low relative to number of variables.
1) Mathematical aspect. Whenever n<=m correlation matrix is singular which means some of last m principle components are zero-variance, that is, they are not existant. This is... | Is the matrix dimension important for performing a valid PCA?
PCA of variables. Number of observations n is low relative to number of variables.
1) Mathematical aspect. Whenever n<=m correlation matrix is singular which means some of last m principle components |
40,883 | Is the matrix dimension important for performing a valid PCA? | Matrix dimension by itself have little todo with PCA validity. What will change is the interpretation of your data and it's all dependent on how you want to use the result.
PCA is very powerful to use to find anomalys or outliers in your data. Maybe you have performed an experiment on two different days, used differen... | Is the matrix dimension important for performing a valid PCA? | Matrix dimension by itself have little todo with PCA validity. What will change is the interpretation of your data and it's all dependent on how you want to use the result.
PCA is very powerful to us | Is the matrix dimension important for performing a valid PCA?
Matrix dimension by itself have little todo with PCA validity. What will change is the interpretation of your data and it's all dependent on how you want to use the result.
PCA is very powerful to use to find anomalys or outliers in your data. Maybe you hav... | Is the matrix dimension important for performing a valid PCA?
Matrix dimension by itself have little todo with PCA validity. What will change is the interpretation of your data and it's all dependent on how you want to use the result.
PCA is very powerful to us |
40,884 | Is the matrix dimension important for performing a valid PCA? | I do not think that you would get any useful information from such an analysis, as lore in my subject area (psychology) suggests a 10;1 ratio in favour of n as a precondition. In some circumstances (where communalities are high) you can get away with 5 or 3 to 1, but a ratio of less than 1 is probably a recipe for disa... | Is the matrix dimension important for performing a valid PCA? | I do not think that you would get any useful information from such an analysis, as lore in my subject area (psychology) suggests a 10;1 ratio in favour of n as a precondition. In some circumstances (w | Is the matrix dimension important for performing a valid PCA?
I do not think that you would get any useful information from such an analysis, as lore in my subject area (psychology) suggests a 10;1 ratio in favour of n as a precondition. In some circumstances (where communalities are high) you can get away with 5 or 3 ... | Is the matrix dimension important for performing a valid PCA?
I do not think that you would get any useful information from such an analysis, as lore in my subject area (psychology) suggests a 10;1 ratio in favour of n as a precondition. In some circumstances (w |
40,885 | How to calculate the difference of two standard deviations? | The standard deviation of the difference between two independent random variables is the square root of the sum of the squares of their individual standard deviations (easier to express as variances) so in this case
$$\sqrt{6.4^2 + 1.5^2} \approx 6.6$$ | How to calculate the difference of two standard deviations? | The standard deviation of the difference between two independent random variables is the square root of the sum of the squares of their individual standard deviations (easier to express as variances) | How to calculate the difference of two standard deviations?
The standard deviation of the difference between two independent random variables is the square root of the sum of the squares of their individual standard deviations (easier to express as variances) so in this case
$$\sqrt{6.4^2 + 1.5^2} \approx 6.6$$ | How to calculate the difference of two standard deviations?
The standard deviation of the difference between two independent random variables is the square root of the sum of the squares of their individual standard deviations (easier to express as variances) |
40,886 | The difference between linear SVM and other linear classifiers? | There are two things going on here.
Difference between primal and dual problem. The "original" objective function of SVM is to minimize $1/2 ||w||^2$. This is called "primal form". Turns out that the objective function you wrote (the one involving $L_D$) is the dual form of this problem. So the two lead to equivalent ... | The difference between linear SVM and other linear classifiers? | There are two things going on here.
Difference between primal and dual problem. The "original" objective function of SVM is to minimize $1/2 ||w||^2$. This is called "primal form". Turns out that the | The difference between linear SVM and other linear classifiers?
There are two things going on here.
Difference between primal and dual problem. The "original" objective function of SVM is to minimize $1/2 ||w||^2$. This is called "primal form". Turns out that the objective function you wrote (the one involving $L_D$) ... | The difference between linear SVM and other linear classifiers?
There are two things going on here.
Difference between primal and dual problem. The "original" objective function of SVM is to minimize $1/2 ||w||^2$. This is called "primal form". Turns out that the |
40,887 | How to express error as a percentage? | It may be meaningful to just divide by the average. E.g. the average number is 1000 and the std is 200, so in a sense this means the actual number can vary by 20% from the baseline.
Also, if you could say who the user of the data are and what they are doing with it, it might be useful. | How to express error as a percentage? | It may be meaningful to just divide by the average. E.g. the average number is 1000 and the std is 200, so in a sense this means the actual number can vary by 20% from the baseline.
Also, if you could | How to express error as a percentage?
It may be meaningful to just divide by the average. E.g. the average number is 1000 and the std is 200, so in a sense this means the actual number can vary by 20% from the baseline.
Also, if you could say who the user of the data are and what they are doing with it, it might be use... | How to express error as a percentage?
It may be meaningful to just divide by the average. E.g. the average number is 1000 and the std is 200, so in a sense this means the actual number can vary by 20% from the baseline.
Also, if you could |
40,888 | How to express error as a percentage? | The standard error of the mean tells you how precise your estimate of the mean is; that doesn't seem to capture what you're trying to do. I would use either a) a histogram, if you care mostly about showing variation, or b) a line chart or area chart, if you want to say something about variation while also showing prog... | How to express error as a percentage? | The standard error of the mean tells you how precise your estimate of the mean is; that doesn't seem to capture what you're trying to do. I would use either a) a histogram, if you care mostly about s | How to express error as a percentage?
The standard error of the mean tells you how precise your estimate of the mean is; that doesn't seem to capture what you're trying to do. I would use either a) a histogram, if you care mostly about showing variation, or b) a line chart or area chart, if you want to say something a... | How to express error as a percentage?
The standard error of the mean tells you how precise your estimate of the mean is; that doesn't seem to capture what you're trying to do. I would use either a) a histogram, if you care mostly about s |
40,889 | How to express error as a percentage? | Assuming your distribution remotely resembles a normal curve, you could convert the standard errors into a more intuitive percentage value pretty easily. For example, if the distribution is pretty normal, approximately 95% of your population falls within +/-1.96*SE of the mean. Building from SheldonCooper's sample valu... | How to express error as a percentage? | Assuming your distribution remotely resembles a normal curve, you could convert the standard errors into a more intuitive percentage value pretty easily. For example, if the distribution is pretty nor | How to express error as a percentage?
Assuming your distribution remotely resembles a normal curve, you could convert the standard errors into a more intuitive percentage value pretty easily. For example, if the distribution is pretty normal, approximately 95% of your population falls within +/-1.96*SE of the mean. Bui... | How to express error as a percentage?
Assuming your distribution remotely resembles a normal curve, you could convert the standard errors into a more intuitive percentage value pretty easily. For example, if the distribution is pretty nor |
40,890 | How to express error as a percentage? | As @rolando2 mentioned, the histogram might be a tool for displaying the variations; and also, as @ashaw stated, you might need to find where 95% percentage of number go to, then, you can probably just use box plot to generate the basic features of your dataset, and put the data to the dashboard that is shown in the co... | How to express error as a percentage? | As @rolando2 mentioned, the histogram might be a tool for displaying the variations; and also, as @ashaw stated, you might need to find where 95% percentage of number go to, then, you can probably jus | How to express error as a percentage?
As @rolando2 mentioned, the histogram might be a tool for displaying the variations; and also, as @ashaw stated, you might need to find where 95% percentage of number go to, then, you can probably just use box plot to generate the basic features of your dataset, and put the data to... | How to express error as a percentage?
As @rolando2 mentioned, the histogram might be a tool for displaying the variations; and also, as @ashaw stated, you might need to find where 95% percentage of number go to, then, you can probably jus |
40,891 | How to express error as a percentage? | $$\text{Percent Error} = \frac{\text{Error}}{\text{Theoretical value}}\times 100$$ | How to express error as a percentage? | $$\text{Percent Error} = \frac{\text{Error}}{\text{Theoretical value}}\times 100$$ | How to express error as a percentage?
$$\text{Percent Error} = \frac{\text{Error}}{\text{Theoretical value}}\times 100$$ | How to express error as a percentage?
$$\text{Percent Error} = \frac{\text{Error}}{\text{Theoretical value}}\times 100$$ |
40,892 | How to express error as a percentage? | The more intuitive form to express the Standard Error in terms of percent is called Relative Standard Error $(RSE)$ which is the expression of the Standard Error $(SE)$ as percent, this is the formula:
$$
RSE\%=\frac{SE}{\bar{x}}\times 100
$$
where,
$RSE\%$ is the Relative Standard Error in percent
$SE$ is the Stand... | How to express error as a percentage? | The more intuitive form to express the Standard Error in terms of percent is called Relative Standard Error $(RSE)$ which is the expression of the Standard Error $(SE)$ as percent, this is the formul | How to express error as a percentage?
The more intuitive form to express the Standard Error in terms of percent is called Relative Standard Error $(RSE)$ which is the expression of the Standard Error $(SE)$ as percent, this is the formula:
$$
RSE\%=\frac{SE}{\bar{x}}\times 100
$$
where,
$RSE\%$ is the Relative Standa... | How to express error as a percentage?
The more intuitive form to express the Standard Error in terms of percent is called Relative Standard Error $(RSE)$ which is the expression of the Standard Error $(SE)$ as percent, this is the formul |
40,893 | Analysis of covariance in R | Here is a detailed presentation | Analysis of covariance in R | Here is a detailed presentation | Analysis of covariance in R
Here is a detailed presentation | Analysis of covariance in R
Here is a detailed presentation |
40,894 | Analysis of covariance in R | This is a very clear presentation from a biologist:
R in Ecology & Evolution: Comparing two regression slopes by means of an ANCOVA | Analysis of covariance in R | This is a very clear presentation from a biologist:
R in Ecology & Evolution: Comparing two regression slopes by means of an ANCOVA | Analysis of covariance in R
This is a very clear presentation from a biologist:
R in Ecology & Evolution: Comparing two regression slopes by means of an ANCOVA | Analysis of covariance in R
This is a very clear presentation from a biologist:
R in Ecology & Evolution: Comparing two regression slopes by means of an ANCOVA |
40,895 | Reading in SVM files in R (libsvm) | The e1071 package has a means for exporting to the libsvm "svm" format in the write.svm function. But to the best of my knowledge, there is no read.svm function. | Reading in SVM files in R (libsvm) | The e1071 package has a means for exporting to the libsvm "svm" format in the write.svm function. But to the best of my knowledge, there is no read.svm function. | Reading in SVM files in R (libsvm)
The e1071 package has a means for exporting to the libsvm "svm" format in the write.svm function. But to the best of my knowledge, there is no read.svm function. | Reading in SVM files in R (libsvm)
The e1071 package has a means for exporting to the libsvm "svm" format in the write.svm function. But to the best of my knowledge, there is no read.svm function. |
40,896 | Reading in SVM files in R (libsvm) | I found a way that is at least now feasible.
Instead of the sparseM package I use the Matrix package to build the sparse matrices. Store the entries and columns in separate lists and then build the matrix by:
data=sparseMatrix(i=rep(1,length[[1]]),j=columns[[loop]],
x=entires[[loop]],dims=c(120000,47235))
for(loop... | Reading in SVM files in R (libsvm) | I found a way that is at least now feasible.
Instead of the sparseM package I use the Matrix package to build the sparse matrices. Store the entries and columns in separate lists and then build the m | Reading in SVM files in R (libsvm)
I found a way that is at least now feasible.
Instead of the sparseM package I use the Matrix package to build the sparse matrices. Store the entries and columns in separate lists and then build the matrix by:
data=sparseMatrix(i=rep(1,length[[1]]),j=columns[[loop]],
x=entires[[lo... | Reading in SVM files in R (libsvm)
I found a way that is at least now feasible.
Instead of the sparseM package I use the Matrix package to build the sparse matrices. Store the entries and columns in separate lists and then build the m |
40,897 | Estimation of probability of a success in binomial distribution | The estimator is biased, regardless.
Note first that $\alpha$ is not identifiable because you cannot distinguish between $\alpha$ and $1-\alpha$. Let's accommodate this problem by allowing that we don't care which coin is which and stipulating (arbitrarily, but with no loss of generality), that $0 \le \alpha \le 1/2... | Estimation of probability of a success in binomial distribution | The estimator is biased, regardless.
Note first that $\alpha$ is not identifiable because you cannot distinguish between $\alpha$ and $1-\alpha$. Let's accommodate this problem by allowing that we | Estimation of probability of a success in binomial distribution
The estimator is biased, regardless.
Note first that $\alpha$ is not identifiable because you cannot distinguish between $\alpha$ and $1-\alpha$. Let's accommodate this problem by allowing that we don't care which coin is which and stipulating (arbitrar... | Estimation of probability of a success in binomial distribution
The estimator is biased, regardless.
Note first that $\alpha$ is not identifiable because you cannot distinguish between $\alpha$ and $1-\alpha$. Let's accommodate this problem by allowing that we |
40,898 | How to tell if the slope of a line is 0 or there is just no relationship? | Well, your colleague definitely is incorrect, as many standard examples will show. For example, for the data $(x, x(1-x))$ with values of $x$ equal to $0, 1/n, 2/n, \ldots, 1$, the slope is exactly zero but obviously there's a strong (quadratic) relationship between "predictor" ($x$) and "response" ($x(1-x)$). Your c... | How to tell if the slope of a line is 0 or there is just no relationship? | Well, your colleague definitely is incorrect, as many standard examples will show. For example, for the data $(x, x(1-x))$ with values of $x$ equal to $0, 1/n, 2/n, \ldots, 1$, the slope is exactly z | How to tell if the slope of a line is 0 or there is just no relationship?
Well, your colleague definitely is incorrect, as many standard examples will show. For example, for the data $(x, x(1-x))$ with values of $x$ equal to $0, 1/n, 2/n, \ldots, 1$, the slope is exactly zero but obviously there's a strong (quadratic)... | How to tell if the slope of a line is 0 or there is just no relationship?
Well, your colleague definitely is incorrect, as many standard examples will show. For example, for the data $(x, x(1-x))$ with values of $x$ equal to $0, 1/n, 2/n, \ldots, 1$, the slope is exactly z |
40,899 | How do I setup up repeated measures data for analysis with nlme()? | Yes, you need to set up your data so that each grouping factor, dependendent variable and covariate corresponds to a column and every row contains one observation (i.e. long format):
Everything that you enter into the model formulas for the random and fixed parts has to be a column in your data set.
You can use reshape... | How do I setup up repeated measures data for analysis with nlme()? | Yes, you need to set up your data so that each grouping factor, dependendent variable and covariate corresponds to a column and every row contains one observation (i.e. long format):
Everything that y | How do I setup up repeated measures data for analysis with nlme()?
Yes, you need to set up your data so that each grouping factor, dependendent variable and covariate corresponds to a column and every row contains one observation (i.e. long format):
Everything that you enter into the model formulas for the random and f... | How do I setup up repeated measures data for analysis with nlme()?
Yes, you need to set up your data so that each grouping factor, dependendent variable and covariate corresponds to a column and every row contains one observation (i.e. long format):
Everything that y |
40,900 | How do I setup up repeated measures data for analysis with nlme()? | It's unlikely reshape will help you out if you're coming straight from SPSS files because you not only need it set up differently, you probably need different data than you were using in SPSS. In the standard repeated measures analysis you enter means of each individual condition for each subject into the analysis but... | How do I setup up repeated measures data for analysis with nlme()? | It's unlikely reshape will help you out if you're coming straight from SPSS files because you not only need it set up differently, you probably need different data than you were using in SPSS. In the | How do I setup up repeated measures data for analysis with nlme()?
It's unlikely reshape will help you out if you're coming straight from SPSS files because you not only need it set up differently, you probably need different data than you were using in SPSS. In the standard repeated measures analysis you enter means ... | How do I setup up repeated measures data for analysis with nlme()?
It's unlikely reshape will help you out if you're coming straight from SPSS files because you not only need it set up differently, you probably need different data than you were using in SPSS. In the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.