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
50,101
Does inference from a heteroskedasticity-consistent covariance matrix follow the t-distribution or the normal?
Prof. Cribari-Neto was kind enough to suggest an article for this topic: F. Cribari-Neto and M. da G. A. Lima, “Heteroskedasticity-consistent interval estimators,” Journal of Statistical Computation and Simulation, vol. 79, no. 6, pp. 787–803, 2009. In this article he uses the normal distribution for the confidence int...
Does inference from a heteroskedasticity-consistent covariance matrix follow the t-distribution or t
Prof. Cribari-Neto was kind enough to suggest an article for this topic: F. Cribari-Neto and M. da G. A. Lima, “Heteroskedasticity-consistent interval estimators,” Journal of Statistical Computation a
Does inference from a heteroskedasticity-consistent covariance matrix follow the t-distribution or the normal? Prof. Cribari-Neto was kind enough to suggest an article for this topic: F. Cribari-Neto and M. da G. A. Lima, “Heteroskedasticity-consistent interval estimators,” Journal of Statistical Computation and Simula...
Does inference from a heteroskedasticity-consistent covariance matrix follow the t-distribution or t Prof. Cribari-Neto was kind enough to suggest an article for this topic: F. Cribari-Neto and M. da G. A. Lima, “Heteroskedasticity-consistent interval estimators,” Journal of Statistical Computation a
50,102
SARIMA estimation
Your acf of the seasonally differenced series strongly suggests the need for a regular difference. What follows is the acf of the doubly differenced series ( your series reularly differenced) . THis acf suggests an autoregressive seasonal factor as the partial acf of lag 12 and 24 are apparently significant although s...
SARIMA estimation
Your acf of the seasonally differenced series strongly suggests the need for a regular difference. What follows is the acf of the doubly differenced series ( your series reularly differenced) . THis
SARIMA estimation Your acf of the seasonally differenced series strongly suggests the need for a regular difference. What follows is the acf of the doubly differenced series ( your series reularly differenced) . THis acf suggests an autoregressive seasonal factor as the partial acf of lag 12 and 24 are apparently sign...
SARIMA estimation Your acf of the seasonally differenced series strongly suggests the need for a regular difference. What follows is the acf of the doubly differenced series ( your series reularly differenced) . THis
50,103
SARIMA estimation
In oreder to get correct results from auto.arima() command try using it as shown below: auto.arima(timeseries,stepwise = F, approximation = FALSE) Hope it helps.
SARIMA estimation
In oreder to get correct results from auto.arima() command try using it as shown below: auto.arima(timeseries,stepwise = F, approximation = FALSE) Hope it helps.
SARIMA estimation In oreder to get correct results from auto.arima() command try using it as shown below: auto.arima(timeseries,stepwise = F, approximation = FALSE) Hope it helps.
SARIMA estimation In oreder to get correct results from auto.arima() command try using it as shown below: auto.arima(timeseries,stepwise = F, approximation = FALSE) Hope it helps.
50,104
Python packages for numerical data imputation [closed]
scikit-learn has an "Imputer" class you should look into. API Overview Demo EDIT: Looks like this class doesn't support imputing from a linear model. You could always try modifying the sklearn code to support it, maybe even submit a pull request: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/prepr...
Python packages for numerical data imputation [closed]
scikit-learn has an "Imputer" class you should look into. API Overview Demo EDIT: Looks like this class doesn't support imputing from a linear model. You could always try modifying the sklearn code
Python packages for numerical data imputation [closed] scikit-learn has an "Imputer" class you should look into. API Overview Demo EDIT: Looks like this class doesn't support imputing from a linear model. You could always try modifying the sklearn code to support it, maybe even submit a pull request: https://github....
Python packages for numerical data imputation [closed] scikit-learn has an "Imputer" class you should look into. API Overview Demo EDIT: Looks like this class doesn't support imputing from a linear model. You could always try modifying the sklearn code
50,105
How to simulate an unreplicated factorial design?
The key to generating random data like yours in R is to use ?rnorm. You may also want to set the random seed to a fixed value, via ?set.seed, so that your simulation can be exactly replicated in the future. For convenience, you may prefer to use ?expand.grid to create your factor combinations, although you can do it ...
How to simulate an unreplicated factorial design?
The key to generating random data like yours in R is to use ?rnorm. You may also want to set the random seed to a fixed value, via ?set.seed, so that your simulation can be exactly replicated in the
How to simulate an unreplicated factorial design? The key to generating random data like yours in R is to use ?rnorm. You may also want to set the random seed to a fixed value, via ?set.seed, so that your simulation can be exactly replicated in the future. For convenience, you may prefer to use ?expand.grid to create...
How to simulate an unreplicated factorial design? The key to generating random data like yours in R is to use ?rnorm. You may also want to set the random seed to a fixed value, via ?set.seed, so that your simulation can be exactly replicated in the
50,106
The vcov function cannot be applied?
Actually you already have the S.E. for zeta and delta, calculated from log(zeta) and log(delta), in summary(hyperbfitalv): Variance-covariance matrix of the parameter estimates wrongly calculated? Let's look at it more closely and see how it was done: lzeta is log(zeta): What you already have, from solve(hyperbfitalv$h...
The vcov function cannot be applied?
Actually you already have the S.E. for zeta and delta, calculated from log(zeta) and log(delta), in summary(hyperbfitalv): Variance-covariance matrix of the parameter estimates wrongly calculated? Let
The vcov function cannot be applied? Actually you already have the S.E. for zeta and delta, calculated from log(zeta) and log(delta), in summary(hyperbfitalv): Variance-covariance matrix of the parameter estimates wrongly calculated? Let's look at it more closely and see how it was done: lzeta is log(zeta): What you al...
The vcov function cannot be applied? Actually you already have the S.E. for zeta and delta, calculated from log(zeta) and log(delta), in summary(hyperbfitalv): Variance-covariance matrix of the parameter estimates wrongly calculated? Let
50,107
The vcov function cannot be applied?
The reason that parameters passed to the optimizer are pi, log(zeta), log(delta), mu not zeta and delta is mostly likely to constrain the optimizer in R+ for zeta and delta. If you need the Hessian of pi, zeta, delta and mu rather than pi, log(zeta), log(delta), and mu, you can to write your own function, which is para...
The vcov function cannot be applied?
The reason that parameters passed to the optimizer are pi, log(zeta), log(delta), mu not zeta and delta is mostly likely to constrain the optimizer in R+ for zeta and delta. If you need the Hessian of
The vcov function cannot be applied? The reason that parameters passed to the optimizer are pi, log(zeta), log(delta), mu not zeta and delta is mostly likely to constrain the optimizer in R+ for zeta and delta. If you need the Hessian of pi, zeta, delta and mu rather than pi, log(zeta), log(delta), and mu, you can to w...
The vcov function cannot be applied? The reason that parameters passed to the optimizer are pi, log(zeta), log(delta), mu not zeta and delta is mostly likely to constrain the optimizer in R+ for zeta and delta. If you need the Hessian of
50,108
Very large theta values using glm.nb in R - alternative approaches?
It doesn't necessarily mean that there is overdispersion (though it could), just that a saturated model may be a better fit. If you only have 7-9 observations, it will be very difficult to accurately test for overdispersion unless you have some values that are just way out there under a Poisson assumption. Another opt...
Very large theta values using glm.nb in R - alternative approaches?
It doesn't necessarily mean that there is overdispersion (though it could), just that a saturated model may be a better fit. If you only have 7-9 observations, it will be very difficult to accurately
Very large theta values using glm.nb in R - alternative approaches? It doesn't necessarily mean that there is overdispersion (though it could), just that a saturated model may be a better fit. If you only have 7-9 observations, it will be very difficult to accurately test for overdispersion unless you have some values ...
Very large theta values using glm.nb in R - alternative approaches? It doesn't necessarily mean that there is overdispersion (though it could), just that a saturated model may be a better fit. If you only have 7-9 observations, it will be very difficult to accurately
50,109
What is smoothing in gaussian processes
One way to think of gaussian processes is a kernel density estimation with a fixed-finite number of kernels not fixed at the data. In this interpretation, the arguments for why KDEs are smoothing apply.
What is smoothing in gaussian processes
One way to think of gaussian processes is a kernel density estimation with a fixed-finite number of kernels not fixed at the data. In this interpretation, the arguments for why KDEs are smoothing appl
What is smoothing in gaussian processes One way to think of gaussian processes is a kernel density estimation with a fixed-finite number of kernels not fixed at the data. In this interpretation, the arguments for why KDEs are smoothing apply.
What is smoothing in gaussian processes One way to think of gaussian processes is a kernel density estimation with a fixed-finite number of kernels not fixed at the data. In this interpretation, the arguments for why KDEs are smoothing appl
50,110
What is smoothing in gaussian processes
From the book Gaussian Processes for Machine Learning by Rasmussen and Williams; If you're doing GP regression, and you want to predict a value at a point $\mathbf{x}^*$, the posterior predictive mean is given by: \begin{align*} \overline{f}_{*} = \mathbf{k}^T_* (K + \sigma^2_n I)^{-1} \mathbf{y} \end{align*} where $\m...
What is smoothing in gaussian processes
From the book Gaussian Processes for Machine Learning by Rasmussen and Williams; If you're doing GP regression, and you want to predict a value at a point $\mathbf{x}^*$, the posterior predictive mean
What is smoothing in gaussian processes From the book Gaussian Processes for Machine Learning by Rasmussen and Williams; If you're doing GP regression, and you want to predict a value at a point $\mathbf{x}^*$, the posterior predictive mean is given by: \begin{align*} \overline{f}_{*} = \mathbf{k}^T_* (K + \sigma^2_n I...
What is smoothing in gaussian processes From the book Gaussian Processes for Machine Learning by Rasmussen and Williams; If you're doing GP regression, and you want to predict a value at a point $\mathbf{x}^*$, the posterior predictive mean
50,111
Incidence Rate Ratio (IRR) in R from linear regression using log-transformed data?
Well, if your numerator is directly interpreted as counts, then both the poisson regression and the log transformed outcome linear regression will be consistent for the same parameters. The only discrepancy in this case is exactly how the observations are weighted (see paragraph 2). If your outcome is rates and you hav...
Incidence Rate Ratio (IRR) in R from linear regression using log-transformed data?
Well, if your numerator is directly interpreted as counts, then both the poisson regression and the log transformed outcome linear regression will be consistent for the same parameters. The only discr
Incidence Rate Ratio (IRR) in R from linear regression using log-transformed data? Well, if your numerator is directly interpreted as counts, then both the poisson regression and the log transformed outcome linear regression will be consistent for the same parameters. The only discrepancy in this case is exactly how th...
Incidence Rate Ratio (IRR) in R from linear regression using log-transformed data? Well, if your numerator is directly interpreted as counts, then both the poisson regression and the log transformed outcome linear regression will be consistent for the same parameters. The only discr
50,112
Issues with using Expectation Maximization algorithm
Three possibilities that come to mind: Numerical stability problems: due to the scale of the numbers you are dealing with, the floating point representation causes small inaccuracies that may become significant. This usually happens when combining numbers on very different scales. Incorrect likelihood/gradient: you ma...
Issues with using Expectation Maximization algorithm
Three possibilities that come to mind: Numerical stability problems: due to the scale of the numbers you are dealing with, the floating point representation causes small inaccuracies that may become
Issues with using Expectation Maximization algorithm Three possibilities that come to mind: Numerical stability problems: due to the scale of the numbers you are dealing with, the floating point representation causes small inaccuracies that may become significant. This usually happens when combining numbers on very di...
Issues with using Expectation Maximization algorithm Three possibilities that come to mind: Numerical stability problems: due to the scale of the numbers you are dealing with, the floating point representation causes small inaccuracies that may become
50,113
Proper way to match a reference population for survival analysis
I will try to provide answer that is relevant to your second question: is there a better [or at least more mainstream] way to obtain a matched reference population? Relative survival analysis The standard approach to comparing the survival in a certain subgroup to that in a wider (and much larger) population is to use ...
Proper way to match a reference population for survival analysis
I will try to provide answer that is relevant to your second question: is there a better [or at least more mainstream] way to obtain a matched reference population? Relative survival analysis The stan
Proper way to match a reference population for survival analysis I will try to provide answer that is relevant to your second question: is there a better [or at least more mainstream] way to obtain a matched reference population? Relative survival analysis The standard approach to comparing the survival in a certain su...
Proper way to match a reference population for survival analysis I will try to provide answer that is relevant to your second question: is there a better [or at least more mainstream] way to obtain a matched reference population? Relative survival analysis The stan
50,114
How to choose the scaling matrix in ABC (without cheating!)?
One solution to your problem, which you may or may not deem as "cheating", is to use dimension reduction before running your sampler (see this review). The most straight-forward approach that comes to mind (and is also discussed in the aforementioned review) is partial least squares regression (PLS). The first use of P...
How to choose the scaling matrix in ABC (without cheating!)?
One solution to your problem, which you may or may not deem as "cheating", is to use dimension reduction before running your sampler (see this review). The most straight-forward approach that comes to
How to choose the scaling matrix in ABC (without cheating!)? One solution to your problem, which you may or may not deem as "cheating", is to use dimension reduction before running your sampler (see this review). The most straight-forward approach that comes to mind (and is also discussed in the aforementioned review) ...
How to choose the scaling matrix in ABC (without cheating!)? One solution to your problem, which you may or may not deem as "cheating", is to use dimension reduction before running your sampler (see this review). The most straight-forward approach that comes to
50,115
How to interpret the significant interaction of two non-significant main predictors?
You seem to have the right intuition in your last paragraph. It is possible for variable x and z in a regression to appear non significant even though they have some effect on the dependent variable y. The following small reproducible example illustrates that fact. set.seed(890) x <- rnorm(1000, mean=10, sd=3) z <- rn...
How to interpret the significant interaction of two non-significant main predictors?
You seem to have the right intuition in your last paragraph. It is possible for variable x and z in a regression to appear non significant even though they have some effect on the dependent variable y
How to interpret the significant interaction of two non-significant main predictors? You seem to have the right intuition in your last paragraph. It is possible for variable x and z in a regression to appear non significant even though they have some effect on the dependent variable y. The following small reproducible ...
How to interpret the significant interaction of two non-significant main predictors? You seem to have the right intuition in your last paragraph. It is possible for variable x and z in a regression to appear non significant even though they have some effect on the dependent variable y
50,116
2x2x5 repeated measures ANOVA: significant 3-way interaction
I'm not sure what you plan to test but looking at your first graph it seems pretty clear. There's generally an effect of colour but on the left side and at larger offsets it disappears. I'm guessing you wanted to test all of the effects of colour to see where they were significant and where they weren't. If you found...
2x2x5 repeated measures ANOVA: significant 3-way interaction
I'm not sure what you plan to test but looking at your first graph it seems pretty clear. There's generally an effect of colour but on the left side and at larger offsets it disappears. I'm guessing
2x2x5 repeated measures ANOVA: significant 3-way interaction I'm not sure what you plan to test but looking at your first graph it seems pretty clear. There's generally an effect of colour but on the left side and at larger offsets it disappears. I'm guessing you wanted to test all of the effects of colour to see wher...
2x2x5 repeated measures ANOVA: significant 3-way interaction I'm not sure what you plan to test but looking at your first graph it seems pretty clear. There's generally an effect of colour but on the left side and at larger offsets it disappears. I'm guessing
50,117
2x2x5 repeated measures ANOVA: significant 3-way interaction
Responding to the last question: At each offset, compute the color x side interaction contrast score for each subject and do a t-test on the mean. Then all you have to worry about is adjusting for multiplicity. I think a stepwise Bonferroni will suffice, but others may think differently. On second thought, there is som...
2x2x5 repeated measures ANOVA: significant 3-way interaction
Responding to the last question: At each offset, compute the color x side interaction contrast score for each subject and do a t-test on the mean. Then all you have to worry about is adjusting for mul
2x2x5 repeated measures ANOVA: significant 3-way interaction Responding to the last question: At each offset, compute the color x side interaction contrast score for each subject and do a t-test on the mean. Then all you have to worry about is adjusting for multiplicity. I think a stepwise Bonferroni will suffice, but ...
2x2x5 repeated measures ANOVA: significant 3-way interaction Responding to the last question: At each offset, compute the color x side interaction contrast score for each subject and do a t-test on the mean. Then all you have to worry about is adjusting for mul
50,118
2x2x5 repeated measures ANOVA: significant 3-way interaction
Generally speaking when in the presence of significant non-additivity ("interaction"), main effects and lower-order interactions are of less important. I usually find that by the time we have teased out a three-factor interaction, most of what is going on in the lower-order effects is explained. I (tentatively) concur...
2x2x5 repeated measures ANOVA: significant 3-way interaction
Generally speaking when in the presence of significant non-additivity ("interaction"), main effects and lower-order interactions are of less important. I usually find that by the time we have teased
2x2x5 repeated measures ANOVA: significant 3-way interaction Generally speaking when in the presence of significant non-additivity ("interaction"), main effects and lower-order interactions are of less important. I usually find that by the time we have teased out a three-factor interaction, most of what is going on in...
2x2x5 repeated measures ANOVA: significant 3-way interaction Generally speaking when in the presence of significant non-additivity ("interaction"), main effects and lower-order interactions are of less important. I usually find that by the time we have teased
50,119
What is the proper way to measure error in collected data for calibration purposes?
I am suggesting the following: Try to find the pattern of the error produced by your sensor ranging from 10 tons to 100 tons objects. You would need as many samples as it was possible to capture the variation of the error in all classes of weight. Let's suppose you could find a pattern of error (see figure below). Just...
What is the proper way to measure error in collected data for calibration purposes?
I am suggesting the following: Try to find the pattern of the error produced by your sensor ranging from 10 tons to 100 tons objects. You would need as many samples as it was possible to capture the v
What is the proper way to measure error in collected data for calibration purposes? I am suggesting the following: Try to find the pattern of the error produced by your sensor ranging from 10 tons to 100 tons objects. You would need as many samples as it was possible to capture the variation of the error in all classes...
What is the proper way to measure error in collected data for calibration purposes? I am suggesting the following: Try to find the pattern of the error produced by your sensor ranging from 10 tons to 100 tons objects. You would need as many samples as it was possible to capture the v
50,120
MLE of multinomial distribution with missing values
One way to square your intuition with ML is to recognize that ML estimates are often biased. The ML estimate of $N$ looks like it's biased a little low. There are only two parameters, $N$ and $p=p_1$, because $p_3=p_1=p$ and $p_2 = 1-p_1-p_3 = 1-2p$. The log likelihood for observations $(a,b)$ is $$\log(\Lambda) = \l...
MLE of multinomial distribution with missing values
One way to square your intuition with ML is to recognize that ML estimates are often biased. The ML estimate of $N$ looks like it's biased a little low. There are only two parameters, $N$ and $p=p_1$
MLE of multinomial distribution with missing values One way to square your intuition with ML is to recognize that ML estimates are often biased. The ML estimate of $N$ looks like it's biased a little low. There are only two parameters, $N$ and $p=p_1$, because $p_3=p_1=p$ and $p_2 = 1-p_1-p_3 = 1-2p$. The log likelih...
MLE of multinomial distribution with missing values One way to square your intuition with ML is to recognize that ML estimates are often biased. The ML estimate of $N$ looks like it's biased a little low. There are only two parameters, $N$ and $p=p_1$
50,121
Boltzmann machines and the asymmetry between 0 and 1
Yes, there is an asymmetry. I haven't thought deeply about it, but I do know of two papers that relate to the issue: 1, 2 Hope these help!
Boltzmann machines and the asymmetry between 0 and 1
Yes, there is an asymmetry. I haven't thought deeply about it, but I do know of two papers that relate to the issue: 1, 2 Hope these help!
Boltzmann machines and the asymmetry between 0 and 1 Yes, there is an asymmetry. I haven't thought deeply about it, but I do know of two papers that relate to the issue: 1, 2 Hope these help!
Boltzmann machines and the asymmetry between 0 and 1 Yes, there is an asymmetry. I haven't thought deeply about it, but I do know of two papers that relate to the issue: 1, 2 Hope these help!
50,122
Energy function of RBM
You only need to verify that the graphical model that represents a RBM fulfills the definition of a MRF as given in the document you refer to. See here for a picture. Then it is warranted that you can write it as a factorized product of positive functions defined on cliques that cover all the nodes and edges of G. Now,...
Energy function of RBM
You only need to verify that the graphical model that represents a RBM fulfills the definition of a MRF as given in the document you refer to. See here for a picture. Then it is warranted that you can
Energy function of RBM You only need to verify that the graphical model that represents a RBM fulfills the definition of a MRF as given in the document you refer to. See here for a picture. Then it is warranted that you can write it as a factorized product of positive functions defined on cliques that cover all the nod...
Energy function of RBM You only need to verify that the graphical model that represents a RBM fulfills the definition of a MRF as given in the document you refer to. See here for a picture. Then it is warranted that you can
50,123
Trying to understand formula for the Survival Function (survival analysis)
All of these terms are standard in actuarial science and all of them apply to all distributions (but when I have seen these terms in studying for exams, we're almost always talking about distributions that are defined only for nonnegative reals). $H(t)$ is the cumulative hazard function, and for any distribution is de...
Trying to understand formula for the Survival Function (survival analysis)
All of these terms are standard in actuarial science and all of them apply to all distributions (but when I have seen these terms in studying for exams, we're almost always talking about distributions
Trying to understand formula for the Survival Function (survival analysis) All of these terms are standard in actuarial science and all of them apply to all distributions (but when I have seen these terms in studying for exams, we're almost always talking about distributions that are defined only for nonnegative reals)...
Trying to understand formula for the Survival Function (survival analysis) All of these terms are standard in actuarial science and all of them apply to all distributions (but when I have seen these terms in studying for exams, we're almost always talking about distributions
50,124
Trying to understand formula for the Survival Function (survival analysis)
Yes, it goes for any hazard function. The hazard function is defined as $$h(t)=\frac{f(t)}{S(t)}$$ where $f(t)$ is the probability density function with respect to time, & the survival function is $$S(t)=1-F(t)$$ where $F(t)$ is the cumulative distribution function. So integrate the first expression, & you get the cum...
Trying to understand formula for the Survival Function (survival analysis)
Yes, it goes for any hazard function. The hazard function is defined as $$h(t)=\frac{f(t)}{S(t)}$$ where $f(t)$ is the probability density function with respect to time, & the survival function is $$
Trying to understand formula for the Survival Function (survival analysis) Yes, it goes for any hazard function. The hazard function is defined as $$h(t)=\frac{f(t)}{S(t)}$$ where $f(t)$ is the probability density function with respect to time, & the survival function is $$S(t)=1-F(t)$$ where $F(t)$ is the cumulative ...
Trying to understand formula for the Survival Function (survival analysis) Yes, it goes for any hazard function. The hazard function is defined as $$h(t)=\frac{f(t)}{S(t)}$$ where $f(t)$ is the probability density function with respect to time, & the survival function is $$
50,125
The way an MA(q) model works
I found it out, but I can't tell you the exact reason for it: The problem is, that the initialization is unkown/strange, if you do an example with more values, you will see, that a simple MA(1) forecasting according to the following rule will work (notation in R of the MA is slightly different to yours, the sign of the...
The way an MA(q) model works
I found it out, but I can't tell you the exact reason for it: The problem is, that the initialization is unkown/strange, if you do an example with more values, you will see, that a simple MA(1) foreca
The way an MA(q) model works I found it out, but I can't tell you the exact reason for it: The problem is, that the initialization is unkown/strange, if you do an example with more values, you will see, that a simple MA(1) forecasting according to the following rule will work (notation in R of the MA is slightly differ...
The way an MA(q) model works I found it out, but I can't tell you the exact reason for it: The problem is, that the initialization is unkown/strange, if you do an example with more values, you will see, that a simple MA(1) foreca
50,126
The way an MA(q) model works
In terms of where those particular numbers come from, this seems to do the trick: > x - m$residuals Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 Or > x + (m$residuals * ma1) Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 I don't know in what sense thes...
The way an MA(q) model works
In terms of where those particular numbers come from, this seems to do the trick: > x - m$residuals Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 Or > x + (m$residual
The way an MA(q) model works In terms of where those particular numbers come from, this seems to do the trick: > x - m$residuals Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 Or > x + (m$residuals * ma1) Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 I ...
The way an MA(q) model works In terms of where those particular numbers come from, this seems to do the trick: > x - m$residuals Time Series: Start = 1 End = 3 Frequency = 1 [1] 3.060660 4.387627 3.000000 Or > x + (m$residual
50,127
Using MatchIt to match groups in a retrospective analysis
You can use the Matching package instead in the following steps: Use any package (preferably the MICE package) to impute n complete data sets. You will need to impute at least 5 data sets. Extract n complete data sets from the imputation. Calculate a propensity score (for treatment) in each complete data set. Average ...
Using MatchIt to match groups in a retrospective analysis
You can use the Matching package instead in the following steps: Use any package (preferably the MICE package) to impute n complete data sets. You will need to impute at least 5 data sets. Extract n
Using MatchIt to match groups in a retrospective analysis You can use the Matching package instead in the following steps: Use any package (preferably the MICE package) to impute n complete data sets. You will need to impute at least 5 data sets. Extract n complete data sets from the imputation. Calculate a propensity...
Using MatchIt to match groups in a retrospective analysis You can use the Matching package instead in the following steps: Use any package (preferably the MICE package) to impute n complete data sets. You will need to impute at least 5 data sets. Extract n
50,128
Exponential family in testing and estimation
This is a rather broad question, but I will try to give in informal reply. Generally, these statements establish the fact that the exponential family is a "well behaved" parametric family of distributions. The emphasis in the first is in that the exponential family satisfies the regularity conditions needed so that a ...
Exponential family in testing and estimation
This is a rather broad question, but I will try to give in informal reply. Generally, these statements establish the fact that the exponential family is a "well behaved" parametric family of distribut
Exponential family in testing and estimation This is a rather broad question, but I will try to give in informal reply. Generally, these statements establish the fact that the exponential family is a "well behaved" parametric family of distributions. The emphasis in the first is in that the exponential family satisfie...
Exponential family in testing and estimation This is a rather broad question, but I will try to give in informal reply. Generally, these statements establish the fact that the exponential family is a "well behaved" parametric family of distribut
50,129
Exponential family in testing and estimation
Here is a partial answer, maybe someone could complement it. "Statistical sufficency" means that no other statistic uses more information from the sample. Definition of sufficiency. Maximum likelihood estimate $\hat{\theta}$ is a sufficient statistic. Cramer-Rao lower bound states the lowest value (lower bound) for the...
Exponential family in testing and estimation
Here is a partial answer, maybe someone could complement it. "Statistical sufficency" means that no other statistic uses more information from the sample. Definition of sufficiency. Maximum likelihood
Exponential family in testing and estimation Here is a partial answer, maybe someone could complement it. "Statistical sufficency" means that no other statistic uses more information from the sample. Definition of sufficiency. Maximum likelihood estimate $\hat{\theta}$ is a sufficient statistic. Cramer-Rao lower bound ...
Exponential family in testing and estimation Here is a partial answer, maybe someone could complement it. "Statistical sufficency" means that no other statistic uses more information from the sample. Definition of sufficiency. Maximum likelihood
50,130
IRT/Rasch modeling with very large N
It is possible to do in R with mirt, though it's still going to be a little slow (maybe 5-10 minutes) and you'll need a good amount of RAM (16+ GB...but with 6 million cases this should be expected). I just tested this and it seems to run okay: library(mirt) dat <- matrix(sample(0:1, 6e6 * 15, TRUE), ncol = 15) mod <- ...
IRT/Rasch modeling with very large N
It is possible to do in R with mirt, though it's still going to be a little slow (maybe 5-10 minutes) and you'll need a good amount of RAM (16+ GB...but with 6 million cases this should be expected).
IRT/Rasch modeling with very large N It is possible to do in R with mirt, though it's still going to be a little slow (maybe 5-10 minutes) and you'll need a good amount of RAM (16+ GB...but with 6 million cases this should be expected). I just tested this and it seems to run okay: library(mirt) dat <- matrix(sample(0:1...
IRT/Rasch modeling with very large N It is possible to do in R with mirt, though it's still going to be a little slow (maybe 5-10 minutes) and you'll need a good amount of RAM (16+ GB...but with 6 million cases this should be expected).
50,131
Is it appropriate to use bootstrapping to measure variance?
Rather than representing problem in the bootstrap, this feature is sometimes used to estimate the bias in your original estimator, see for example chapter 10 of Bradley Efron and Robert Tibshirani (1993) "An Introduction to the Bootstrap". Chapman & Hall/CRC.
Is it appropriate to use bootstrapping to measure variance?
Rather than representing problem in the bootstrap, this feature is sometimes used to estimate the bias in your original estimator, see for example chapter 10 of Bradley Efron and Robert Tibshirani (19
Is it appropriate to use bootstrapping to measure variance? Rather than representing problem in the bootstrap, this feature is sometimes used to estimate the bias in your original estimator, see for example chapter 10 of Bradley Efron and Robert Tibshirani (1993) "An Introduction to the Bootstrap". Chapman & Hall/CRC.
Is it appropriate to use bootstrapping to measure variance? Rather than representing problem in the bootstrap, this feature is sometimes used to estimate the bias in your original estimator, see for example chapter 10 of Bradley Efron and Robert Tibshirani (19
50,132
Percentiles of a distribution
Since you are bootstrapping, why not take all of your observed medians and calculate the sample standard deviation $s$ and use that as your estimator of $\sigma$?
Percentiles of a distribution
Since you are bootstrapping, why not take all of your observed medians and calculate the sample standard deviation $s$ and use that as your estimator of $\sigma$?
Percentiles of a distribution Since you are bootstrapping, why not take all of your observed medians and calculate the sample standard deviation $s$ and use that as your estimator of $\sigma$?
Percentiles of a distribution Since you are bootstrapping, why not take all of your observed medians and calculate the sample standard deviation $s$ and use that as your estimator of $\sigma$?
50,133
Percentiles of a distribution
If I am understanding your intent, then the answer is "no", don't divide. The sample size is taken into account as part of the bootstrapping process. Of course the values that are using will mostly be meaningful if everything is normally distributed, the fact that you are bootstrapping makes that seem an unlikely ass...
Percentiles of a distribution
If I am understanding your intent, then the answer is "no", don't divide. The sample size is taken into account as part of the bootstrapping process. Of course the values that are using will mostly
Percentiles of a distribution If I am understanding your intent, then the answer is "no", don't divide. The sample size is taken into account as part of the bootstrapping process. Of course the values that are using will mostly be meaningful if everything is normally distributed, the fact that you are bootstrapping m...
Percentiles of a distribution If I am understanding your intent, then the answer is "no", don't divide. The sample size is taken into account as part of the bootstrapping process. Of course the values that are using will mostly
50,134
Percentiles of a distribution
Following along the lines developed by Greg and soakley, here's a function that calculates the (bootstrapped) standard errors of an estimate of the median: median.w.se = function(vec,B){ # Inputs: vector of data (vec) # number of bootstrap replicates (B) # Outputs: list with estimates of median and stan...
Percentiles of a distribution
Following along the lines developed by Greg and soakley, here's a function that calculates the (bootstrapped) standard errors of an estimate of the median: median.w.se = function(vec,B){ # Inputs:
Percentiles of a distribution Following along the lines developed by Greg and soakley, here's a function that calculates the (bootstrapped) standard errors of an estimate of the median: median.w.se = function(vec,B){ # Inputs: vector of data (vec) # number of bootstrap replicates (B) # Outputs: list wit...
Percentiles of a distribution Following along the lines developed by Greg and soakley, here's a function that calculates the (bootstrapped) standard errors of an estimate of the median: median.w.se = function(vec,B){ # Inputs:
50,135
Logistic regression algorithm in Ruby
As regression problems go, it's actually a fairly complicated algorithm. The answer to your question depends a lot on whether you have access to a reliable general-purpose CG optimization algorithm. If you do, the problem becomes somewhat simpler. If you don't, I wouldn't recommend re-implementing logistic regression ...
Logistic regression algorithm in Ruby
As regression problems go, it's actually a fairly complicated algorithm. The answer to your question depends a lot on whether you have access to a reliable general-purpose CG optimization algorithm.
Logistic regression algorithm in Ruby As regression problems go, it's actually a fairly complicated algorithm. The answer to your question depends a lot on whether you have access to a reliable general-purpose CG optimization algorithm. If you do, the problem becomes somewhat simpler. If you don't, I wouldn't recommen...
Logistic regression algorithm in Ruby As regression problems go, it's actually a fairly complicated algorithm. The answer to your question depends a lot on whether you have access to a reliable general-purpose CG optimization algorithm.
50,136
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance
The eigenfunctions of SE kernel under Gaussian measure can be written using Hermite polynomials (see references below). If instead Lebesgue measure is used, it's more complicated. C. E. Rasmussen & C. K. I. Williams, Gaussian Processes for Machine Learning, the MIT Press, 2006, ISBN 026218253X. http://www.gaussianproc...
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance
The eigenfunctions of SE kernel under Gaussian measure can be written using Hermite polynomials (see references below). If instead Lebesgue measure is used, it's more complicated. C. E. Rasmussen & C
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance The eigenfunctions of SE kernel under Gaussian measure can be written using Hermite polynomials (see references below). If instead Lebesgue measure is used, it's more complicated. C. E. Rasmussen & C. K. I. Williams, Gaussian Processe...
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance The eigenfunctions of SE kernel under Gaussian measure can be written using Hermite polynomials (see references below). If instead Lebesgue measure is used, it's more complicated. C. E. Rasmussen & C
50,137
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance
You could try following first the standard way of deriving the solution for $k(s,t) = e^{-|s-t|}$ given for instance in [1] and then try to reapply this to your case. If you don't have the access to [1] I can give an outline here. Generally you have to carefully differentiate $\int k_{SE}(s,t)f_i(s)dt = \lambda_i f_i(s...
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance
You could try following first the standard way of deriving the solution for $k(s,t) = e^{-|s-t|}$ given for instance in [1] and then try to reapply this to your case. If you don't have the access to [
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance You could try following first the standard way of deriving the solution for $k(s,t) = e^{-|s-t|}$ given for instance in [1] and then try to reapply this to your case. If you don't have the access to [1] I can give an outline here. Gene...
Closed form Karhunen-Loeve/PCA expansion for gaussian/squared-exponential covariance You could try following first the standard way of deriving the solution for $k(s,t) = e^{-|s-t|}$ given for instance in [1] and then try to reapply this to your case. If you don't have the access to [
50,138
Hypothesis test on data with confounding spatial clustering
According to this paper, OLS is consistent in the presence of spatial autocorrelation, but standard errors are incorrect and need to be adjusted. Solomon Hsiang provides stata and matlab code for doing so. Unfortunately I'm not familiar with any R code for this. There are certainly other approaches to this sort of pr...
Hypothesis test on data with confounding spatial clustering
According to this paper, OLS is consistent in the presence of spatial autocorrelation, but standard errors are incorrect and need to be adjusted. Solomon Hsiang provides stata and matlab code for doi
Hypothesis test on data with confounding spatial clustering According to this paper, OLS is consistent in the presence of spatial autocorrelation, but standard errors are incorrect and need to be adjusted. Solomon Hsiang provides stata and matlab code for doing so. Unfortunately I'm not familiar with any R code for t...
Hypothesis test on data with confounding spatial clustering According to this paper, OLS is consistent in the presence of spatial autocorrelation, but standard errors are incorrect and need to be adjusted. Solomon Hsiang provides stata and matlab code for doi
50,139
How are categorical variables used when fitting a decision tree in scikit-learn?
To encode categorical feature as a scipy.sparse matrix you can use the DictVectorizer class. Then call the .toarray() method on the result to convert it to an contiguous numpy array as the scikit-learn trees do not support sparse input yet.
How are categorical variables used when fitting a decision tree in scikit-learn?
To encode categorical feature as a scipy.sparse matrix you can use the DictVectorizer class. Then call the .toarray() method on the result to convert it to an contiguous numpy array as the scikit-lear
How are categorical variables used when fitting a decision tree in scikit-learn? To encode categorical feature as a scipy.sparse matrix you can use the DictVectorizer class. Then call the .toarray() method on the result to convert it to an contiguous numpy array as the scikit-learn trees do not support sparse input yet...
How are categorical variables used when fitting a decision tree in scikit-learn? To encode categorical feature as a scipy.sparse matrix you can use the DictVectorizer class. Then call the .toarray() method on the result to convert it to an contiguous numpy array as the scikit-lear
50,140
What to do for missing data in time series [closed]
This is a good application for the EM algorithm of Shumway and Stoffer. First you need to specify your arima model, then you can use the Kalman Filter because is can handle missing values (see the Durbin and Koopman textbook). For starting parameter values you can compute the expected value of the missing values, then ...
What to do for missing data in time series [closed]
This is a good application for the EM algorithm of Shumway and Stoffer. First you need to specify your arima model, then you can use the Kalman Filter because is can handle missing values (see the Dur
What to do for missing data in time series [closed] This is a good application for the EM algorithm of Shumway and Stoffer. First you need to specify your arima model, then you can use the Kalman Filter because is can handle missing values (see the Durbin and Koopman textbook). For starting parameter values you can com...
What to do for missing data in time series [closed] This is a good application for the EM algorithm of Shumway and Stoffer. First you need to specify your arima model, then you can use the Kalman Filter because is can handle missing values (see the Dur
50,141
What to do for missing data in time series [closed]
I would suggest looking into multiple imputation algorithms. Gary King has produced a package for R called Amelia that does very sophisticated multiple imputation and can handle time series quite well. Amelia treats all of the data as multivariate normal and performs multiple random draws from that distribution until t...
What to do for missing data in time series [closed]
I would suggest looking into multiple imputation algorithms. Gary King has produced a package for R called Amelia that does very sophisticated multiple imputation and can handle time series quite well
What to do for missing data in time series [closed] I would suggest looking into multiple imputation algorithms. Gary King has produced a package for R called Amelia that does very sophisticated multiple imputation and can handle time series quite well. Amelia treats all of the data as multivariate normal and performs ...
What to do for missing data in time series [closed] I would suggest looking into multiple imputation algorithms. Gary King has produced a package for R called Amelia that does very sophisticated multiple imputation and can handle time series quite well
50,142
Relationship between sample mean and sample survival probability
The survival function at time $t$ for an exponential distribution with true mean $\mu$ is $$ S(t) = e^{-t/\mu} \quad , \quad t > 0. $$ According to http://en.wikipedia.org/wiki/Exponential_distribution#Parameter_estimation one over the sample mean is the maximum likelihood estimator of $1/\mu$, so that $$ \hat S(t) = e...
Relationship between sample mean and sample survival probability
The survival function at time $t$ for an exponential distribution with true mean $\mu$ is $$ S(t) = e^{-t/\mu} \quad , \quad t > 0. $$ According to http://en.wikipedia.org/wiki/Exponential_distributio
Relationship between sample mean and sample survival probability The survival function at time $t$ for an exponential distribution with true mean $\mu$ is $$ S(t) = e^{-t/\mu} \quad , \quad t > 0. $$ According to http://en.wikipedia.org/wiki/Exponential_distribution#Parameter_estimation one over the sample mean is the ...
Relationship between sample mean and sample survival probability The survival function at time $t$ for an exponential distribution with true mean $\mu$ is $$ S(t) = e^{-t/\mu} \quad , \quad t > 0. $$ According to http://en.wikipedia.org/wiki/Exponential_distributio
50,143
Is it possible to compare model fit for a gaussian vs binomial glm
Well first things first, you can try eyeballing the residuals and see if one or other model makes them more even, but I suspect given that you haven't seen a clear winner, that won't split them either. In which case I think this really comes down to your definition of "better". Because you are using the same explanato...
Is it possible to compare model fit for a gaussian vs binomial glm
Well first things first, you can try eyeballing the residuals and see if one or other model makes them more even, but I suspect given that you haven't seen a clear winner, that won't split them either
Is it possible to compare model fit for a gaussian vs binomial glm Well first things first, you can try eyeballing the residuals and see if one or other model makes them more even, but I suspect given that you haven't seen a clear winner, that won't split them either. In which case I think this really comes down to you...
Is it possible to compare model fit for a gaussian vs binomial glm Well first things first, you can try eyeballing the residuals and see if one or other model makes them more even, but I suspect given that you haven't seen a clear winner, that won't split them either
50,144
Robust parameter estimation for Exponentially modified Gaussian distribution
If it seems like most of the outliers are to the far right you could decide on a threshold including most of the datapoints to the left and censor all values to the right of that threshold. It would be akin to trimming but without introducing a bias. I don't know how you would run such an analysis in a classical statis...
Robust parameter estimation for Exponentially modified Gaussian distribution
If it seems like most of the outliers are to the far right you could decide on a threshold including most of the datapoints to the left and censor all values to the right of that threshold. It would b
Robust parameter estimation for Exponentially modified Gaussian distribution If it seems like most of the outliers are to the far right you could decide on a threshold including most of the datapoints to the left and censor all values to the right of that threshold. It would be akin to trimming but without introducing ...
Robust parameter estimation for Exponentially modified Gaussian distribution If it seems like most of the outliers are to the far right you could decide on a threshold including most of the datapoints to the left and censor all values to the right of that threshold. It would b
50,145
Cannibalization of product sales
If you wish to determine the impact of sales of product B on Product A , you must look at the conditional effect. The conditions that you might need to consider are 1) day-of-the-week ; 2) week-of-the-year ; 3) month-of-the-year 4) specific days-of-the-month ; 5) lead and lag effects around each holiday/event 5) Monday...
Cannibalization of product sales
If you wish to determine the impact of sales of product B on Product A , you must look at the conditional effect. The conditions that you might need to consider are 1) day-of-the-week ; 2) week-of-the
Cannibalization of product sales If you wish to determine the impact of sales of product B on Product A , you must look at the conditional effect. The conditions that you might need to consider are 1) day-of-the-week ; 2) week-of-the-year ; 3) month-of-the-year 4) specific days-of-the-month ; 5) lead and lag effects ar...
Cannibalization of product sales If you wish to determine the impact of sales of product B on Product A , you must look at the conditional effect. The conditions that you might need to consider are 1) day-of-the-week ; 2) week-of-the
50,146
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean?
If I have understood your question correctly, you want the CDF of the bivariate normal distribution. That is, for the standardized case: $$ \Phi(\mathrm{\pmb{b}},\rho) = \frac{1}{2\pi\sqrt{1-\rho^{2}}}\int_{-\infty}^{b_{1}}{\int_{-\infty}^{b_{2}}}\exp\left[{-(x^{2}-2\rho xy+y^{2}})/(2(1-\rho^{2})\right]\mathrm{d}y\math...
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio
If I have understood your question correctly, you want the CDF of the bivariate normal distribution. That is, for the standardized case: $$ \Phi(\mathrm{\pmb{b}},\rho) = \frac{1}{2\pi\sqrt{1-\rho^{2}}
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean? If I have understood your question correctly, you want the CDF of the bivariate normal distribution. That is, for the standardized case: $$ \Phi(\mathrm{\pmb{b}},\rho) = \frac{1}{2\pi\sqrt{1-\rho^{2}}}...
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio If I have understood your question correctly, you want the CDF of the bivariate normal distribution. That is, for the standardized case: $$ \Phi(\mathrm{\pmb{b}},\rho) = \frac{1}{2\pi\sqrt{1-\rho^{2}}
50,147
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean?
Good question. Your intuitions and approaches are right. There is, however, no simple analytic formula for the joint probability you're after. One could write a short program in R to compute the probability but it would necessarily use numerical integration.
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio
Good question. Your intuitions and approaches are right. There is, however, no simple analytic formula for the joint probability you're after. One could write a short program in R to compute the proba
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean? Good question. Your intuitions and approaches are right. There is, however, no simple analytic formula for the joint probability you're after. One could write a short program in R to compute the probab...
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio Good question. Your intuitions and approaches are right. There is, however, no simple analytic formula for the joint probability you're after. One could write a short program in R to compute the proba
50,148
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean?
Here is a useful explanation for #3: Multivariate Normal distribution See 'bivariate normal distribution' in that section you can see the pdf for a bivariate normal distribution with the correlation coefficient. You can integrate the pdf between -infinity to $\mu$ + 2*$\sigma$. Or perhaps this is enough info to find an...
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio
Here is a useful explanation for #3: Multivariate Normal distribution See 'bivariate normal distribution' in that section you can see the pdf for a bivariate normal distribution with the correlation c
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviations above the mean? Here is a useful explanation for #3: Multivariate Normal distribution See 'bivariate normal distribution' in that section you can see the pdf for a bivariate normal distribution with the correlation co...
Correlated bivariate normal distribution: finding percentage of of data which is 2 standard deviatio Here is a useful explanation for #3: Multivariate Normal distribution See 'bivariate normal distribution' in that section you can see the pdf for a bivariate normal distribution with the correlation c
50,149
does it make sense for non-negative data to subtract the mean and divide by the std dev?
First of all, there have been several questions on standardization already, e.g. Variables are often adjusted (e.g. standardised) before making a model - when is this a good idea, and when is it a bad one? When should you center your data & when should you standardize? Subtracting the mean is one way of centering you...
does it make sense for non-negative data to subtract the mean and divide by the std dev?
First of all, there have been several questions on standardization already, e.g. Variables are often adjusted (e.g. standardised) before making a model - when is this a good idea, and when is it a ba
does it make sense for non-negative data to subtract the mean and divide by the std dev? First of all, there have been several questions on standardization already, e.g. Variables are often adjusted (e.g. standardised) before making a model - when is this a good idea, and when is it a bad one? When should you center y...
does it make sense for non-negative data to subtract the mean and divide by the std dev? First of all, there have been several questions on standardization already, e.g. Variables are often adjusted (e.g. standardised) before making a model - when is this a good idea, and when is it a ba
50,150
does it make sense for non-negative data to subtract the mean and divide by the std dev?
Since you mention sparse coding, I assume you are referring to natural images. For natural images, standardization is often carried out because natural image patches have pretty stable statistical properties once you subtracted the constant part (and whitened them; see below). You may look at it like this: A natural im...
does it make sense for non-negative data to subtract the mean and divide by the std dev?
Since you mention sparse coding, I assume you are referring to natural images. For natural images, standardization is often carried out because natural image patches have pretty stable statistical pro
does it make sense for non-negative data to subtract the mean and divide by the std dev? Since you mention sparse coding, I assume you are referring to natural images. For natural images, standardization is often carried out because natural image patches have pretty stable statistical properties once you subtracted the...
does it make sense for non-negative data to subtract the mean and divide by the std dev? Since you mention sparse coding, I assume you are referring to natural images. For natural images, standardization is often carried out because natural image patches have pretty stable statistical pro
50,151
Latent class model with both continuous and categorical indicators in R [closed]
Regarding question 2, another similar question here (Which R package to use to conduct a latent class growth analysis (LCGA) / growth mixture model (GMM)?) suggested OpenMx for "advanced structural equation modeling" in R. If it can be used to estimate growth mixture models, I'm betting it can be used to model a hybrid...
Latent class model with both continuous and categorical indicators in R [closed]
Regarding question 2, another similar question here (Which R package to use to conduct a latent class growth analysis (LCGA) / growth mixture model (GMM)?) suggested OpenMx for "advanced structural eq
Latent class model with both continuous and categorical indicators in R [closed] Regarding question 2, another similar question here (Which R package to use to conduct a latent class growth analysis (LCGA) / growth mixture model (GMM)?) suggested OpenMx for "advanced structural equation modeling" in R. If it can be use...
Latent class model with both continuous and categorical indicators in R [closed] Regarding question 2, another similar question here (Which R package to use to conduct a latent class growth analysis (LCGA) / growth mixture model (GMM)?) suggested OpenMx for "advanced structural eq
50,152
Question about inverse in a two-step estimator as a joint GMM-estimators approach
First of all, the formula for the inverse of $J$ has nothing to do with Jacobians, it is just the general inverse of a $2 \times 2$ matrix. Second, using the scalar expressions in the matrix context is extremely dangerous, as the matrix multiplication is not commutative, unlike the scalar multiplication (i.e., generall...
Question about inverse in a two-step estimator as a joint GMM-estimators approach
First of all, the formula for the inverse of $J$ has nothing to do with Jacobians, it is just the general inverse of a $2 \times 2$ matrix. Second, using the scalar expressions in the matrix context i
Question about inverse in a two-step estimator as a joint GMM-estimators approach First of all, the formula for the inverse of $J$ has nothing to do with Jacobians, it is just the general inverse of a $2 \times 2$ matrix. Second, using the scalar expressions in the matrix context is extremely dangerous, as the matrix m...
Question about inverse in a two-step estimator as a joint GMM-estimators approach First of all, the formula for the inverse of $J$ has nothing to do with Jacobians, it is just the general inverse of a $2 \times 2$ matrix. Second, using the scalar expressions in the matrix context i
50,153
What kind of experiment might Hiawatha have designed?
I will make a stab at a helpful answer (the teacher in me thinks that you will learn more by using google or wikipedia or other resources to learn about truncated normals and who Bancroft is than reading a Cliff's notes versions (and the realist in me realizes that I would have to look up Bancroft to be sure of giving ...
What kind of experiment might Hiawatha have designed?
I will make a stab at a helpful answer (the teacher in me thinks that you will learn more by using google or wikipedia or other resources to learn about truncated normals and who Bancroft is than read
What kind of experiment might Hiawatha have designed? I will make a stab at a helpful answer (the teacher in me thinks that you will learn more by using google or wikipedia or other resources to learn about truncated normals and who Bancroft is than reading a Cliff's notes versions (and the realist in me realizes that ...
What kind of experiment might Hiawatha have designed? I will make a stab at a helpful answer (the teacher in me thinks that you will learn more by using google or wikipedia or other resources to learn about truncated normals and who Bancroft is than read
50,154
Combining posterior distributions
Unfortunately, you cannot combine posterior chains in that way. From your description, what you have are independent draws from MCMC chains for the following posterior distributions: $$p(\beta|\boldsymbol{x}_i, \pi_i),$$ where $\boldsymbol{x}_i$ is the data-set and $\pi_i$ is a prior in model $i = 1, ..., n$. You wan...
Combining posterior distributions
Unfortunately, you cannot combine posterior chains in that way. From your description, what you have are independent draws from MCMC chains for the following posterior distributions: $$p(\beta|\bolds
Combining posterior distributions Unfortunately, you cannot combine posterior chains in that way. From your description, what you have are independent draws from MCMC chains for the following posterior distributions: $$p(\beta|\boldsymbol{x}_i, \pi_i),$$ where $\boldsymbol{x}_i$ is the data-set and $\pi_i$ is a prior ...
Combining posterior distributions Unfortunately, you cannot combine posterior chains in that way. From your description, what you have are independent draws from MCMC chains for the following posterior distributions: $$p(\beta|\bolds
50,155
Categorial features in linear machine learning algorithms
What you told about categorial features is called feature binarization. That is extremely easy and commonly used. And that is basically the only working algorithm if your features consist of one word. What is used in Vowpal Wabbit package (as well as in most packages I know, like scipy, scikit) is a little bit more com...
Categorial features in linear machine learning algorithms
What you told about categorial features is called feature binarization. That is extremely easy and commonly used. And that is basically the only working algorithm if your features consist of one word.
Categorial features in linear machine learning algorithms What you told about categorial features is called feature binarization. That is extremely easy and commonly used. And that is basically the only working algorithm if your features consist of one word. What is used in Vowpal Wabbit package (as well as in most pac...
Categorial features in linear machine learning algorithms What you told about categorial features is called feature binarization. That is extremely easy and commonly used. And that is basically the only working algorithm if your features consist of one word.
50,156
Ordinal Probit model in plain English
The reason one would use an OP is to study a categorical variables that is ordered, but where the actual values reflect only a ranking. For example, take bond ratings. There's an underlying variable that is unobserved called creditworthiness that some agency has divided into bins, which range from AAA, AA, A, BBB, and ...
Ordinal Probit model in plain English
The reason one would use an OP is to study a categorical variables that is ordered, but where the actual values reflect only a ranking. For example, take bond ratings. There's an underlying variable t
Ordinal Probit model in plain English The reason one would use an OP is to study a categorical variables that is ordered, but where the actual values reflect only a ranking. For example, take bond ratings. There's an underlying variable that is unobserved called creditworthiness that some agency has divided into bins, ...
Ordinal Probit model in plain English The reason one would use an OP is to study a categorical variables that is ordered, but where the actual values reflect only a ranking. For example, take bond ratings. There's an underlying variable t
50,157
Do categorical variables have to be dummy coded in SVM?
Actually when you look at the model.matrix documentation, you will find that the way formula is specified it automatically dummy code the factor variables. You can specify explicitly via contrasts options about what to do with the factor variables. Hope that helped!!
Do categorical variables have to be dummy coded in SVM?
Actually when you look at the model.matrix documentation, you will find that the way formula is specified it automatically dummy code the factor variables. You can specify explicitly via contrasts opt
Do categorical variables have to be dummy coded in SVM? Actually when you look at the model.matrix documentation, you will find that the way formula is specified it automatically dummy code the factor variables. You can specify explicitly via contrasts options about what to do with the factor variables. Hope that help...
Do categorical variables have to be dummy coded in SVM? Actually when you look at the model.matrix documentation, you will find that the way formula is specified it automatically dummy code the factor variables. You can specify explicitly via contrasts opt
50,158
Analysis of Deviance in R - Which test?
As @caracal points out, anova(mod2,test="Chisq") should return the desired test. We can't tell what went wrong with 1-pchisq() as we don't know what you put inside the brackets; but one guess would be that you accidentally tested for the significance of all explanatory variables in the model together.
Analysis of Deviance in R - Which test?
As @caracal points out, anova(mod2,test="Chisq") should return the desired test. We can't tell what went wrong with 1-pchisq() as we don't know what you put inside the brackets; but one guess would b
Analysis of Deviance in R - Which test? As @caracal points out, anova(mod2,test="Chisq") should return the desired test. We can't tell what went wrong with 1-pchisq() as we don't know what you put inside the brackets; but one guess would be that you accidentally tested for the significance of all explanatory variables...
Analysis of Deviance in R - Which test? As @caracal points out, anova(mod2,test="Chisq") should return the desired test. We can't tell what went wrong with 1-pchisq() as we don't know what you put inside the brackets; but one guess would b
50,159
Analysis of Deviance in R - Which test?
I have to say, I've been doing statistics for 10 years and I've never heard anyone call it Analysis of Deviance before. Where is that from? Just wondering, it is a logical title though of course "Analysis of Variance" is the more universal term, as the portmanteau ANOVA implies. At any rate, the difference is that in t...
Analysis of Deviance in R - Which test?
I have to say, I've been doing statistics for 10 years and I've never heard anyone call it Analysis of Deviance before. Where is that from? Just wondering, it is a logical title though of course "Anal
Analysis of Deviance in R - Which test? I have to say, I've been doing statistics for 10 years and I've never heard anyone call it Analysis of Deviance before. Where is that from? Just wondering, it is a logical title though of course "Analysis of Variance" is the more universal term, as the portmanteau ANOVA implies. ...
Analysis of Deviance in R - Which test? I have to say, I've been doing statistics for 10 years and I've never heard anyone call it Analysis of Deviance before. Where is that from? Just wondering, it is a logical title though of course "Anal
50,160
How do you predict the value of new instance, when the training data were normalized?
The normalization takes place with following steps: The mean of each variable is subtracted from that variable. Each variable is then divided by the standard deviation(stddev) of that variable So you have mean and stddev from the unnormalized X. The most common way is to use this mean and stddev to normalize the new ...
How do you predict the value of new instance, when the training data were normalized?
The normalization takes place with following steps: The mean of each variable is subtracted from that variable. Each variable is then divided by the standard deviation(stddev) of that variable So yo
How do you predict the value of new instance, when the training data were normalized? The normalization takes place with following steps: The mean of each variable is subtracted from that variable. Each variable is then divided by the standard deviation(stddev) of that variable So you have mean and stddev from the un...
How do you predict the value of new instance, when the training data were normalized? The normalization takes place with following steps: The mean of each variable is subtracted from that variable. Each variable is then divided by the standard deviation(stddev) of that variable So yo
50,161
How do you predict the value of new instance, when the training data were normalized?
I normalized the sample data based on the values in the training dataset: sample_data['col1'] = (sample_data['col1'] - training_data['col1'].min()) / (training_data['col1'].max() - training_data['col1'].min()) sample_data['col2'] = (sample_data['col2'] - training_data['col2'].min()) / (training_data['col2'].max() - tra...
How do you predict the value of new instance, when the training data were normalized?
I normalized the sample data based on the values in the training dataset: sample_data['col1'] = (sample_data['col1'] - training_data['col1'].min()) / (training_data['col1'].max() - training_data['col1
How do you predict the value of new instance, when the training data were normalized? I normalized the sample data based on the values in the training dataset: sample_data['col1'] = (sample_data['col1'] - training_data['col1'].min()) / (training_data['col1'].max() - training_data['col1'].min()) sample_data['col2'] = (s...
How do you predict the value of new instance, when the training data were normalized? I normalized the sample data based on the values in the training dataset: sample_data['col1'] = (sample_data['col1'] - training_data['col1'].min()) / (training_data['col1'].max() - training_data['col1
50,162
Random block design ANOVA in R
That looks right to me! There's a really good tutorial that I use in teaching R courses Baron's Using R for Psychology Experiments. Even if you're not doing psych. experiments, I think they way Baron does a great job explaining ANOVA and the proper use of the Error() function.
Random block design ANOVA in R
That looks right to me! There's a really good tutorial that I use in teaching R courses Baron's Using R for Psychology Experiments. Even if you're not doing psych. experiments, I think they way Baron
Random block design ANOVA in R That looks right to me! There's a really good tutorial that I use in teaching R courses Baron's Using R for Psychology Experiments. Even if you're not doing psych. experiments, I think they way Baron does a great job explaining ANOVA and the proper use of the Error() function.
Random block design ANOVA in R That looks right to me! There's a really good tutorial that I use in teaching R courses Baron's Using R for Psychology Experiments. Even if you're not doing psych. experiments, I think they way Baron
50,163
Random block design ANOVA in R
Just note aov( response ~ item + restaurant ) gives the same Anova (same DF and sums of squares for restaurant, item and residuals, so same F test) as aov( response ~ item + Error( restaurant / item ) )
Random block design ANOVA in R
Just note aov( response ~ item + restaurant ) gives the same Anova (same DF and sums of squares for restaurant, item and residuals, so same F test) as aov( response ~ item + Error( restaurant / ite
Random block design ANOVA in R Just note aov( response ~ item + restaurant ) gives the same Anova (same DF and sums of squares for restaurant, item and residuals, so same F test) as aov( response ~ item + Error( restaurant / item ) )
Random block design ANOVA in R Just note aov( response ~ item + restaurant ) gives the same Anova (same DF and sums of squares for restaurant, item and residuals, so same F test) as aov( response ~ item + Error( restaurant / ite
50,164
Fisher Distance for feature selection
'N' or number of samples is usually the number of cases, this can be the number of subject (assuming you have one measurement of each feature per subject) or the number of measurements per feature. If you have multiple measurements per feature, per subject you will need to account for this. Generally, EEG channels shou...
Fisher Distance for feature selection
'N' or number of samples is usually the number of cases, this can be the number of subject (assuming you have one measurement of each feature per subject) or the number of measurements per feature. If
Fisher Distance for feature selection 'N' or number of samples is usually the number of cases, this can be the number of subject (assuming you have one measurement of each feature per subject) or the number of measurements per feature. If you have multiple measurements per feature, per subject you will need to account ...
Fisher Distance for feature selection 'N' or number of samples is usually the number of cases, this can be the number of subject (assuming you have one measurement of each feature per subject) or the number of measurements per feature. If
50,165
Fisher Distance for feature selection
You may experiment with two representations of the problem. 1- Group ECG channels of one class together and label class A as 1 and class B as 2. So, the target variable is composed of two classes only. Now, you may apply some feature ranking methods which are independent of the classification process. For example, you ...
Fisher Distance for feature selection
You may experiment with two representations of the problem. 1- Group ECG channels of one class together and label class A as 1 and class B as 2. So, the target variable is composed of two classes only
Fisher Distance for feature selection You may experiment with two representations of the problem. 1- Group ECG channels of one class together and label class A as 1 and class B as 2. So, the target variable is composed of two classes only. Now, you may apply some feature ranking methods which are independent of the cla...
Fisher Distance for feature selection You may experiment with two representations of the problem. 1- Group ECG channels of one class together and label class A as 1 and class B as 2. So, the target variable is composed of two classes only
50,166
How to interpret regression coefficients when outcome variable was transformed to $1 / \sqrt{Y}$?
The model is $$\frac{1}{\sqrt{Y}} = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p + \varepsilon$$ where $Y$ is the original outcome, the $X_i$ are the explanatory variables, the $\beta_i$ are the coefficients, and $\varepsilon$ are iid, mean-zero error terms. Writing $b_i$ for the estimated value of $\beta_i$, we see t...
How to interpret regression coefficients when outcome variable was transformed to $1 / \sqrt{Y}$?
The model is $$\frac{1}{\sqrt{Y}} = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p + \varepsilon$$ where $Y$ is the original outcome, the $X_i$ are the explanatory variables, the $\beta_i$ are the coeff
How to interpret regression coefficients when outcome variable was transformed to $1 / \sqrt{Y}$? The model is $$\frac{1}{\sqrt{Y}} = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p + \varepsilon$$ where $Y$ is the original outcome, the $X_i$ are the explanatory variables, the $\beta_i$ are the coefficients, and $\varepsi...
How to interpret regression coefficients when outcome variable was transformed to $1 / \sqrt{Y}$? The model is $$\frac{1}{\sqrt{Y}} = \beta_0 + \beta_1 X_1 + \cdots + \beta_p X_p + \varepsilon$$ where $Y$ is the original outcome, the $X_i$ are the explanatory variables, the $\beta_i$ are the coeff
50,167
Dose response and lethal dose 50 analysis
Both analyses (non-linear regression and binomial GLM) have their advantages and disadvantages. They will produce quite similar LD50s if the data aren't variable but can produce wildly different results if the data are quite variable or if the bottom of the curve is not found (e.g. 100% lethality in the highest treatme...
Dose response and lethal dose 50 analysis
Both analyses (non-linear regression and binomial GLM) have their advantages and disadvantages. They will produce quite similar LD50s if the data aren't variable but can produce wildly different resul
Dose response and lethal dose 50 analysis Both analyses (non-linear regression and binomial GLM) have their advantages and disadvantages. They will produce quite similar LD50s if the data aren't variable but can produce wildly different results if the data are quite variable or if the bottom of the curve is not found (...
Dose response and lethal dose 50 analysis Both analyses (non-linear regression and binomial GLM) have their advantages and disadvantages. They will produce quite similar LD50s if the data aren't variable but can produce wildly different resul
50,168
Dose response and lethal dose 50 analysis
Let's assume non-linear regression means non-linear least squares which is a common way of measuring pharmacokinetic curves. That is the intent of the package "drc" which has been renamed "drm". However this is not the right methodology to measure fatality. Pharmacokinetic curves predicts the concentration of drug, or ...
Dose response and lethal dose 50 analysis
Let's assume non-linear regression means non-linear least squares which is a common way of measuring pharmacokinetic curves. That is the intent of the package "drc" which has been renamed "drm". Howev
Dose response and lethal dose 50 analysis Let's assume non-linear regression means non-linear least squares which is a common way of measuring pharmacokinetic curves. That is the intent of the package "drc" which has been renamed "drm". However this is not the right methodology to measure fatality. Pharmacokinetic curv...
Dose response and lethal dose 50 analysis Let's assume non-linear regression means non-linear least squares which is a common way of measuring pharmacokinetic curves. That is the intent of the package "drc" which has been renamed "drm". Howev
50,169
Wald vs. LR $\chi^2$ tests in SPSS generalized linear models
It's hard to be definitive without knowing all the details of your model (such as sample size), but I would remark that the likelihood ratio, Wald, and score estimators are only asymptotically equivalent. That is, they agree as N $\rightarrow$ $\infty$. The Wald estimator is generally considered to be the least reliabl...
Wald vs. LR $\chi^2$ tests in SPSS generalized linear models
It's hard to be definitive without knowing all the details of your model (such as sample size), but I would remark that the likelihood ratio, Wald, and score estimators are only asymptotically equival
Wald vs. LR $\chi^2$ tests in SPSS generalized linear models It's hard to be definitive without knowing all the details of your model (such as sample size), but I would remark that the likelihood ratio, Wald, and score estimators are only asymptotically equivalent. That is, they agree as N $\rightarrow$ $\infty$. The W...
Wald vs. LR $\chi^2$ tests in SPSS generalized linear models It's hard to be definitive without knowing all the details of your model (such as sample size), but I would remark that the likelihood ratio, Wald, and score estimators are only asymptotically equival
50,170
Follow-up updates in case-cohort designs
From your question, I gather you have two concerns: What happens to the control population when new cases are observed in a case-cohort study? What happens when not all covariates measured in some case or control subjects can be feasibly measured in all case or control subjects? First, a very brief overview of case-c...
Follow-up updates in case-cohort designs
From your question, I gather you have two concerns: What happens to the control population when new cases are observed in a case-cohort study? What happens when not all covariates measured in some ca
Follow-up updates in case-cohort designs From your question, I gather you have two concerns: What happens to the control population when new cases are observed in a case-cohort study? What happens when not all covariates measured in some case or control subjects can be feasibly measured in all case or control subjects...
Follow-up updates in case-cohort designs From your question, I gather you have two concerns: What happens to the control population when new cases are observed in a case-cohort study? What happens when not all covariates measured in some ca
50,171
BIC or AIC to determine the optimal number of clusters in a scale-free graph?
AIC and BIC are used for constraining the complexity of a range of models competing to explain the same data. Following on the heels of results in complexity theory and machine learning, there is reason to believe that in some scenarios, using these proxies for complexity gives useful info about the model that explains...
BIC or AIC to determine the optimal number of clusters in a scale-free graph?
AIC and BIC are used for constraining the complexity of a range of models competing to explain the same data. Following on the heels of results in complexity theory and machine learning, there is reas
BIC or AIC to determine the optimal number of clusters in a scale-free graph? AIC and BIC are used for constraining the complexity of a range of models competing to explain the same data. Following on the heels of results in complexity theory and machine learning, there is reason to believe that in some scenarios, usin...
BIC or AIC to determine the optimal number of clusters in a scale-free graph? AIC and BIC are used for constraining the complexity of a range of models competing to explain the same data. Following on the heels of results in complexity theory and machine learning, there is reas
50,172
Minimum sample size to achieve a specific confidence level and interval
this may or may not be helpful for you, but Diaz-Emperanza (1996, 2000) has published on how many replications a Monte Carlo study has so that a certain width of a confidence interval for a parameter is achieved. Here are the two papers, which can both be accessed at http://ideas.repec.org/e/pda47.html Ignacio Díaz-E...
Minimum sample size to achieve a specific confidence level and interval
this may or may not be helpful for you, but Diaz-Emperanza (1996, 2000) has published on how many replications a Monte Carlo study has so that a certain width of a confidence interval for a parameter
Minimum sample size to achieve a specific confidence level and interval this may or may not be helpful for you, but Diaz-Emperanza (1996, 2000) has published on how many replications a Monte Carlo study has so that a certain width of a confidence interval for a parameter is achieved. Here are the two papers, which can...
Minimum sample size to achieve a specific confidence level and interval this may or may not be helpful for you, but Diaz-Emperanza (1996, 2000) has published on how many replications a Monte Carlo study has so that a certain width of a confidence interval for a parameter
50,173
Time series analysis on login data to forecast CPU demand using R
Exponential smoothing is just a special case of an ARIMA model. If there is a benefit to fitting a general ARIMA model it is because of its generality and not that it handles gaps in the data any better than exponetial smoothing. I don't see any reason for throwing out February 29th. Individual dates would not have ...
Time series analysis on login data to forecast CPU demand using R
Exponential smoothing is just a special case of an ARIMA model. If there is a benefit to fitting a general ARIMA model it is because of its generality and not that it handles gaps in the data any bet
Time series analysis on login data to forecast CPU demand using R Exponential smoothing is just a special case of an ARIMA model. If there is a benefit to fitting a general ARIMA model it is because of its generality and not that it handles gaps in the data any better than exponetial smoothing. I don't see any reason...
Time series analysis on login data to forecast CPU demand using R Exponential smoothing is just a special case of an ARIMA model. If there is a benefit to fitting a general ARIMA model it is because of its generality and not that it handles gaps in the data any bet
50,174
Time series analysis on login data to forecast CPU demand using R
First of all, you should check out the auto.arima and ets functions in the forecast package. Secondly, you should consider which frequency is most appropriate for the data. Do you really expect that the logins on 11/1/2011 will be directly related to the logins on 11/1/2001, 11/1/2002...11/1/2010? Make some seasonplo...
Time series analysis on login data to forecast CPU demand using R
First of all, you should check out the auto.arima and ets functions in the forecast package. Secondly, you should consider which frequency is most appropriate for the data. Do you really expect that
Time series analysis on login data to forecast CPU demand using R First of all, you should check out the auto.arima and ets functions in the forecast package. Secondly, you should consider which frequency is most appropriate for the data. Do you really expect that the logins on 11/1/2011 will be directly related to th...
Time series analysis on login data to forecast CPU demand using R First of all, you should check out the auto.arima and ets functions in the forecast package. Secondly, you should consider which frequency is most appropriate for the data. Do you really expect that
50,175
Confidence interval for the number of trials before you've observed each outcome in the sample space?
What you want is more of a prediction interval than a confidence interval (you are not estimating a population parameter). Here is a simulation approach: tmpfun <- function() { book <- numeric(200) while( any(book==0) ) { tmp <- sample(200,1) book[tmp] <- book[tmp] + 1 } return(sum(book)...
Confidence interval for the number of trials before you've observed each outcome in the sample space
What you want is more of a prediction interval than a confidence interval (you are not estimating a population parameter). Here is a simulation approach: tmpfun <- function() { book <- numeric(200
Confidence interval for the number of trials before you've observed each outcome in the sample space? What you want is more of a prediction interval than a confidence interval (you are not estimating a population parameter). Here is a simulation approach: tmpfun <- function() { book <- numeric(200) while( any(b...
Confidence interval for the number of trials before you've observed each outcome in the sample space What you want is more of a prediction interval than a confidence interval (you are not estimating a population parameter). Here is a simulation approach: tmpfun <- function() { book <- numeric(200
50,176
dummy variables with overlapping categories?
Question: Can Dummy variables have overlapping categories? Answer: No. Explanation: Dummy variables arise when you try to recode Categorical variables with more than two categories into a series of binary variables. Since these categories partition your dataset (i.e. each observation can be assigned to one and only one...
dummy variables with overlapping categories?
Question: Can Dummy variables have overlapping categories? Answer: No. Explanation: Dummy variables arise when you try to recode Categorical variables with more than two categories into a series of bi
dummy variables with overlapping categories? Question: Can Dummy variables have overlapping categories? Answer: No. Explanation: Dummy variables arise when you try to recode Categorical variables with more than two categories into a series of binary variables. Since these categories partition your dataset (i.e. each ob...
dummy variables with overlapping categories? Question: Can Dummy variables have overlapping categories? Answer: No. Explanation: Dummy variables arise when you try to recode Categorical variables with more than two categories into a series of bi
50,177
dummy variables with overlapping categories?
As others pointed out, dummy variables cannot be overlapping. What you have is several categorical variables, each of which will generate its own dummy variables. But you are worried (justifiably) about collinearity. There are several things you can do here. 1) If you are using R you can check the extent of collinearit...
dummy variables with overlapping categories?
As others pointed out, dummy variables cannot be overlapping. What you have is several categorical variables, each of which will generate its own dummy variables. But you are worried (justifiably) abo
dummy variables with overlapping categories? As others pointed out, dummy variables cannot be overlapping. What you have is several categorical variables, each of which will generate its own dummy variables. But you are worried (justifiably) about collinearity. There are several things you can do here. 1) If you are us...
dummy variables with overlapping categories? As others pointed out, dummy variables cannot be overlapping. What you have is several categorical variables, each of which will generate its own dummy variables. But you are worried (justifiably) abo
50,178
Comparing rates of binomial outcome response in large datasets
I think the answer is very simple. The large sample size is a blessing. Don't be upset with it. The standard errors are realistic. The problem you have is that you are think of a traditional null hypothesis that the difference is exactly 0 and the alternative is that it is statistically significantly different from...
Comparing rates of binomial outcome response in large datasets
I think the answer is very simple. The large sample size is a blessing. Don't be upset with it. The standard errors are realistic. The problem you have is that you are think of a traditional null
Comparing rates of binomial outcome response in large datasets I think the answer is very simple. The large sample size is a blessing. Don't be upset with it. The standard errors are realistic. The problem you have is that you are think of a traditional null hypothesis that the difference is exactly 0 and the alter...
Comparing rates of binomial outcome response in large datasets I think the answer is very simple. The large sample size is a blessing. Don't be upset with it. The standard errors are realistic. The problem you have is that you are think of a traditional null
50,179
Random generation of n-dimensional data with possibly correlated variables
One approach to generating multivariate random data with correlations is to use a copula. Basically you generate n-dimensional data with uniform margins and a correlation structure, then transform the data to the marginal distribution of interest (binary variables can be generated by simply seeing if the value is grea...
Random generation of n-dimensional data with possibly correlated variables
One approach to generating multivariate random data with correlations is to use a copula. Basically you generate n-dimensional data with uniform margins and a correlation structure, then transform th
Random generation of n-dimensional data with possibly correlated variables One approach to generating multivariate random data with correlations is to use a copula. Basically you generate n-dimensional data with uniform margins and a correlation structure, then transform the data to the marginal distribution of intere...
Random generation of n-dimensional data with possibly correlated variables One approach to generating multivariate random data with correlations is to use a copula. Basically you generate n-dimensional data with uniform margins and a correlation structure, then transform th
50,180
Tests for normed vector
You could transform your data points to spherical coordinates so that you get $p-1$ angles. Your null hypothesis is equivalent to the fact that those angles are independent and uniformly distributed. So you can do a goodness of fit test. Now there is the complication that you have a $p-1$-dimensional distribution. This...
Tests for normed vector
You could transform your data points to spherical coordinates so that you get $p-1$ angles. Your null hypothesis is equivalent to the fact that those angles are independent and uniformly distributed.
Tests for normed vector You could transform your data points to spherical coordinates so that you get $p-1$ angles. Your null hypothesis is equivalent to the fact that those angles are independent and uniformly distributed. So you can do a goodness of fit test. Now there is the complication that you have a $p-1$-dimens...
Tests for normed vector You could transform your data points to spherical coordinates so that you get $p-1$ angles. Your null hypothesis is equivalent to the fact that those angles are independent and uniformly distributed.
50,181
How to visualize both total counts of categories and proportions of subcategories in a plot?
This example of embedded/layered bar plots may represent one alternative. The three main categories are represented by individual bars, then embedded within are subcategory bars (created in ggplot2). Blog Link (Learning R)
How to visualize both total counts of categories and proportions of subcategories in a plot?
This example of embedded/layered bar plots may represent one alternative. The three main categories are represented by individual bars, then embedded within are subcategory bars (created in ggplot2).
How to visualize both total counts of categories and proportions of subcategories in a plot? This example of embedded/layered bar plots may represent one alternative. The three main categories are represented by individual bars, then embedded within are subcategory bars (created in ggplot2). Blog Link (Learning R)
How to visualize both total counts of categories and proportions of subcategories in a plot? This example of embedded/layered bar plots may represent one alternative. The three main categories are represented by individual bars, then embedded within are subcategory bars (created in ggplot2).
50,182
Is cross-validation an effective approach for feature/model selection for microarray data?
The answer really seems to be that cross-validation is not great because its results are extremely variable but it remains the best option available. The only other competitive approach seems to be the 0.632 bootstrap estimator which has slightly lower variance but also under-estimates the true performance. See Is cr...
Is cross-validation an effective approach for feature/model selection for microarray data?
The answer really seems to be that cross-validation is not great because its results are extremely variable but it remains the best option available. The only other competitive approach seems to be t
Is cross-validation an effective approach for feature/model selection for microarray data? The answer really seems to be that cross-validation is not great because its results are extremely variable but it remains the best option available. The only other competitive approach seems to be the 0.632 bootstrap estimator ...
Is cross-validation an effective approach for feature/model selection for microarray data? The answer really seems to be that cross-validation is not great because its results are extremely variable but it remains the best option available. The only other competitive approach seems to be t
50,183
Is cross-validation an effective approach for feature/model selection for microarray data?
I think the problem may be that your training set is too small and therefore not representative of the entire population and if you test it on even smaller tests sets these data can be very different. This is more of a general large p small n problem and pertains to that type of problemn whether it is genetics or not....
Is cross-validation an effective approach for feature/model selection for microarray data?
I think the problem may be that your training set is too small and therefore not representative of the entire population and if you test it on even smaller tests sets these data can be very different.
Is cross-validation an effective approach for feature/model selection for microarray data? I think the problem may be that your training set is too small and therefore not representative of the entire population and if you test it on even smaller tests sets these data can be very different. This is more of a general l...
Is cross-validation an effective approach for feature/model selection for microarray data? I think the problem may be that your training set is too small and therefore not representative of the entire population and if you test it on even smaller tests sets these data can be very different.
50,184
How to cluster LDA/LSI topics generated by gensim?
This is an example. You need copy matutils.py and utils.py from gensim first, and the directory should like the pic blow. The code blow should be in doc_similar.py. Then just move your data_file into directory data and change fname in function main. #coding:utf-8 from gensim import corpora, models, similarities impor...
How to cluster LDA/LSI topics generated by gensim?
This is an example. You need copy matutils.py and utils.py from gensim first, and the directory should like the pic blow. The code blow should be in doc_similar.py. Then just move your data_file into
How to cluster LDA/LSI topics generated by gensim? This is an example. You need copy matutils.py and utils.py from gensim first, and the directory should like the pic blow. The code blow should be in doc_similar.py. Then just move your data_file into directory data and change fname in function main. #coding:utf-8 fro...
How to cluster LDA/LSI topics generated by gensim? This is an example. You need copy matutils.py and utils.py from gensim first, and the directory should like the pic blow. The code blow should be in doc_similar.py. Then just move your data_file into
50,185
Minimisation algorithm for a mix of discreet and continuous parameters?
It sounds like you need a derivative free method (since it seems you can't supply a gradient for your objective function). I guess your parameter space is not bounded since you are currently using Nelder-Mead. I'm not sure what software you're using but you should check out NOMAD which is "freely distributed under th...
Minimisation algorithm for a mix of discreet and continuous parameters?
It sounds like you need a derivative free method (since it seems you can't supply a gradient for your objective function). I guess your parameter space is not bounded since you are currently using Ne
Minimisation algorithm for a mix of discreet and continuous parameters? It sounds like you need a derivative free method (since it seems you can't supply a gradient for your objective function). I guess your parameter space is not bounded since you are currently using Nelder-Mead. I'm not sure what software you're us...
Minimisation algorithm for a mix of discreet and continuous parameters? It sounds like you need a derivative free method (since it seems you can't supply a gradient for your objective function). I guess your parameter space is not bounded since you are currently using Ne
50,186
Visualising generalized linear model
From StatSoft, without links: Diagnostics in the generalized linear model. The two basic types of residuals are the so-called Pearson residuals and deviance residuals. Pearson residuals are based on the difference between observed responses and the predicted values; deviance residuals are based on the contribution of ...
Visualising generalized linear model
From StatSoft, without links: Diagnostics in the generalized linear model. The two basic types of residuals are the so-called Pearson residuals and deviance residuals. Pearson residuals are based on
Visualising generalized linear model From StatSoft, without links: Diagnostics in the generalized linear model. The two basic types of residuals are the so-called Pearson residuals and deviance residuals. Pearson residuals are based on the difference between observed responses and the predicted values; deviance residu...
Visualising generalized linear model From StatSoft, without links: Diagnostics in the generalized linear model. The two basic types of residuals are the so-called Pearson residuals and deviance residuals. Pearson residuals are based on
50,187
SVM and non-linear predictive models - feature selection
I'd say that it is generally a bad idea to use feature selection for non-linear support vector machines. The reason for using a maximal margin classifier is that it is an approximate implementation of a theoretical performance bound that is independent of the dimensionality of the feature space in which it is construc...
SVM and non-linear predictive models - feature selection
I'd say that it is generally a bad idea to use feature selection for non-linear support vector machines. The reason for using a maximal margin classifier is that it is an approximate implementation o
SVM and non-linear predictive models - feature selection I'd say that it is generally a bad idea to use feature selection for non-linear support vector machines. The reason for using a maximal margin classifier is that it is an approximate implementation of a theoretical performance bound that is independent of the di...
SVM and non-linear predictive models - feature selection I'd say that it is generally a bad idea to use feature selection for non-linear support vector machines. The reason for using a maximal margin classifier is that it is an approximate implementation o
50,188
SVM and non-linear predictive models - feature selection
The whole point of deploying a non-linear kernel is to increase the dimensionality of the space, hoping that in the high dimensional space, there would be a linear solution to the problem. If you have lot of features, hopefully, they will offer some little extra information that can be used to build a better model. Do...
SVM and non-linear predictive models - feature selection
The whole point of deploying a non-linear kernel is to increase the dimensionality of the space, hoping that in the high dimensional space, there would be a linear solution to the problem. If you hav
SVM and non-linear predictive models - feature selection The whole point of deploying a non-linear kernel is to increase the dimensionality of the space, hoping that in the high dimensional space, there would be a linear solution to the problem. If you have lot of features, hopefully, they will offer some little extra...
SVM and non-linear predictive models - feature selection The whole point of deploying a non-linear kernel is to increase the dimensionality of the space, hoping that in the high dimensional space, there would be a linear solution to the problem. If you hav
50,189
Find the probability of having k red balls after d days
Hmm, tough for an interview question. Condition the probability of being finished on the d+1-th draw on already having exactly k-1 red balls in the bag. The probability of being finished with the next draw is $1-\frac{k-1}{n}$. Now we just need to find the probability of having exactly k-1 red balls after d draws and m...
Find the probability of having k red balls after d days
Hmm, tough for an interview question. Condition the probability of being finished on the d+1-th draw on already having exactly k-1 red balls in the bag. The probability of being finished with the next
Find the probability of having k red balls after d days Hmm, tough for an interview question. Condition the probability of being finished on the d+1-th draw on already having exactly k-1 red balls in the bag. The probability of being finished with the next draw is $1-\frac{k-1}{n}$. Now we just need to find the probabi...
Find the probability of having k red balls after d days Hmm, tough for an interview question. Condition the probability of being finished on the d+1-th draw on already having exactly k-1 red balls in the bag. The probability of being finished with the next
50,190
Find the probability of having k red balls after d days
I think you have to set up this problem using Markov Chains theory, are you familiar with it? The system you are considering is a discrete system which can be in any of the (n+1) states { [0], [1], [2], ... ,[n] } where [j] is the state with j red balls. The system starts from the state [0] and evolves over time with a...
Find the probability of having k red balls after d days
I think you have to set up this problem using Markov Chains theory, are you familiar with it? The system you are considering is a discrete system which can be in any of the (n+1) states { [0], [1], [2
Find the probability of having k red balls after d days I think you have to set up this problem using Markov Chains theory, are you familiar with it? The system you are considering is a discrete system which can be in any of the (n+1) states { [0], [1], [2], ... ,[n] } where [j] is the state with j red balls. The syste...
Find the probability of having k red balls after d days I think you have to set up this problem using Markov Chains theory, are you familiar with it? The system you are considering is a discrete system which can be in any of the (n+1) states { [0], [1], [2
50,191
Find the probability of having k red balls after d days
This is a Markov chain exercise. Consider the vector $P_{d} = (p_d^0, p_d^1, \ldots, p_d^n) \in [0,1]^{n+1}$ where $p_d^k$ is the probability that there are exactly $k$ red ball in the bag after $d$ draws. Now, since $p_{d+1}^{k} = \frac{n-(k-1)}{n}p_{d}^{k-1} + \frac{k}{n}p_{d}^{k}$ one can immediately find a matrix $...
Find the probability of having k red balls after d days
This is a Markov chain exercise. Consider the vector $P_{d} = (p_d^0, p_d^1, \ldots, p_d^n) \in [0,1]^{n+1}$ where $p_d^k$ is the probability that there are exactly $k$ red ball in the bag after $d$ d
Find the probability of having k red balls after d days This is a Markov chain exercise. Consider the vector $P_{d} = (p_d^0, p_d^1, \ldots, p_d^n) \in [0,1]^{n+1}$ where $p_d^k$ is the probability that there are exactly $k$ red ball in the bag after $d$ draws. Now, since $p_{d+1}^{k} = \frac{n-(k-1)}{n}p_{d}^{k-1} + \...
Find the probability of having k red balls after d days This is a Markov chain exercise. Consider the vector $P_{d} = (p_d^0, p_d^1, \ldots, p_d^n) \in [0,1]^{n+1}$ where $p_d^k$ is the probability that there are exactly $k$ red ball in the bag after $d$ d
50,192
Repeated-measures ANCOVA in R?
It seems like you're saying that covariate B is correlated with predictor A. In that case, that is not a situation where you can use an ANCOVA. In an ANCOVA your factor B would have to be correlated only with the RT, not the other predictors. If you ever do find a situation where an ANCOVA is appropriate it would ju...
Repeated-measures ANCOVA in R?
It seems like you're saying that covariate B is correlated with predictor A. In that case, that is not a situation where you can use an ANCOVA. In an ANCOVA your factor B would have to be correlated
Repeated-measures ANCOVA in R? It seems like you're saying that covariate B is correlated with predictor A. In that case, that is not a situation where you can use an ANCOVA. In an ANCOVA your factor B would have to be correlated only with the RT, not the other predictors. If you ever do find a situation where an AN...
Repeated-measures ANCOVA in R? It seems like you're saying that covariate B is correlated with predictor A. In that case, that is not a situation where you can use an ANCOVA. In an ANCOVA your factor B would have to be correlated
50,193
Compound distribution in Bayesian sense vs. compound distribution as random sum
Indeed the term compound is overloaded in statistics with both definitions. I prefer to describe the latter scenario as " a random sum of random variables" rather than a compound distribution and the former as a "continuous mixture" distribution but the term compound is also used and common for both. The only relation...
Compound distribution in Bayesian sense vs. compound distribution as random sum
Indeed the term compound is overloaded in statistics with both definitions. I prefer to describe the latter scenario as " a random sum of random variables" rather than a compound distribution and the
Compound distribution in Bayesian sense vs. compound distribution as random sum Indeed the term compound is overloaded in statistics with both definitions. I prefer to describe the latter scenario as " a random sum of random variables" rather than a compound distribution and the former as a "continuous mixture" distrib...
Compound distribution in Bayesian sense vs. compound distribution as random sum Indeed the term compound is overloaded in statistics with both definitions. I prefer to describe the latter scenario as " a random sum of random variables" rather than a compound distribution and the
50,194
Using ordinal regression to evaluate predictor "importance"?
I think that you are thinking about this in a good way. In addition to using generalized $R^2$ to gauge predictive discrimination you can use formal likelihood ratio $\chi^2$ tests for added information as well as something I talk about in my book Regression Modeling Strategies called the "adequacy index". This is ju...
Using ordinal regression to evaluate predictor "importance"?
I think that you are thinking about this in a good way. In addition to using generalized $R^2$ to gauge predictive discrimination you can use formal likelihood ratio $\chi^2$ tests for added informat
Using ordinal regression to evaluate predictor "importance"? I think that you are thinking about this in a good way. In addition to using generalized $R^2$ to gauge predictive discrimination you can use formal likelihood ratio $\chi^2$ tests for added information as well as something I talk about in my book Regression...
Using ordinal regression to evaluate predictor "importance"? I think that you are thinking about this in a good way. In addition to using generalized $R^2$ to gauge predictive discrimination you can use formal likelihood ratio $\chi^2$ tests for added informat
50,195
Public databases of learned HMM models for NLP
Python NLTK has a dataset called hmm_treebank_pos_tagger that you can download here. Stanford has a POS tagger described here. You can download it along with the training data
Public databases of learned HMM models for NLP
Python NLTK has a dataset called hmm_treebank_pos_tagger that you can download here. Stanford has a POS tagger described here. You can download it along with the training data
Public databases of learned HMM models for NLP Python NLTK has a dataset called hmm_treebank_pos_tagger that you can download here. Stanford has a POS tagger described here. You can download it along with the training data
Public databases of learned HMM models for NLP Python NLTK has a dataset called hmm_treebank_pos_tagger that you can download here. Stanford has a POS tagger described here. You can download it along with the training data
50,196
Public databases of learned HMM models for NLP
http://wordnet.princeton.edu/ not directly what you are after, but might be useful. It has a large list of words, stems and many different linkages between them. It was useful to me as a resource creating an NLP engine
Public databases of learned HMM models for NLP
http://wordnet.princeton.edu/ not directly what you are after, but might be useful. It has a large list of words, stems and many different linkages between them. It was useful to me as a resource cre
Public databases of learned HMM models for NLP http://wordnet.princeton.edu/ not directly what you are after, but might be useful. It has a large list of words, stems and many different linkages between them. It was useful to me as a resource creating an NLP engine
Public databases of learned HMM models for NLP http://wordnet.princeton.edu/ not directly what you are after, but might be useful. It has a large list of words, stems and many different linkages between them. It was useful to me as a resource cre
50,197
How to compare weighted multivariate linear models?
I recommend calculating AIC model weights for each of these. This gives you the flexibility of being able to choose the AIC-best model for inference, or if there is considerable structural uncertainty, to obtain a model-weighted estimate of the effect of x2.
How to compare weighted multivariate linear models?
I recommend calculating AIC model weights for each of these. This gives you the flexibility of being able to choose the AIC-best model for inference, or if there is considerable structural uncertainty
How to compare weighted multivariate linear models? I recommend calculating AIC model weights for each of these. This gives you the flexibility of being able to choose the AIC-best model for inference, or if there is considerable structural uncertainty, to obtain a model-weighted estimate of the effect of x2.
How to compare weighted multivariate linear models? I recommend calculating AIC model weights for each of these. This gives you the flexibility of being able to choose the AIC-best model for inference, or if there is considerable structural uncertainty
50,198
Normalized correlation with a constant vector
Let $\boldsymbol{x}$ and $\boldsymbol{y}$ be your two vectors and let $\boldsymbol{\bar{x}} \equiv \bar{x} \boldsymbol{1}$ and $\boldsymbol{\bar{y}} \equiv \bar{y} \boldsymbol{1}$ be constant vectors for the means of the two original vectors. The components of the sample correlation are: $$\begin{matrix} s_{x,y}^2 = \...
Normalized correlation with a constant vector
Let $\boldsymbol{x}$ and $\boldsymbol{y}$ be your two vectors and let $\boldsymbol{\bar{x}} \equiv \bar{x} \boldsymbol{1}$ and $\boldsymbol{\bar{y}} \equiv \bar{y} \boldsymbol{1}$ be constant vectors
Normalized correlation with a constant vector Let $\boldsymbol{x}$ and $\boldsymbol{y}$ be your two vectors and let $\boldsymbol{\bar{x}} \equiv \bar{x} \boldsymbol{1}$ and $\boldsymbol{\bar{y}} \equiv \bar{y} \boldsymbol{1}$ be constant vectors for the means of the two original vectors. The components of the sample c...
Normalized correlation with a constant vector Let $\boldsymbol{x}$ and $\boldsymbol{y}$ be your two vectors and let $\boldsymbol{\bar{x}} \equiv \bar{x} \boldsymbol{1}$ and $\boldsymbol{\bar{y}} \equiv \bar{y} \boldsymbol{1}$ be constant vectors
50,199
Restricted permutations
If env is the variable you are interested in then we need to test the "effect" of this variable in terms of the variance explained by env. To do the test using a permutation we need to think about what is and isn't exchangeable under the Null hypothesis we are testing. In this case, the Null is no effect of env so unde...
Restricted permutations
If env is the variable you are interested in then we need to test the "effect" of this variable in terms of the variance explained by env. To do the test using a permutation we need to think about wha
Restricted permutations If env is the variable you are interested in then we need to test the "effect" of this variable in terms of the variance explained by env. To do the test using a permutation we need to think about what is and isn't exchangeable under the Null hypothesis we are testing. In this case, the Null is ...
Restricted permutations If env is the variable you are interested in then we need to test the "effect" of this variable in terms of the variance explained by env. To do the test using a permutation we need to think about wha
50,200
How to detect changes in amplitude?
Try package ‘changepoint’, described here: http://www.lancs.ac.uk/~killick/Pub/KillickEckley2011.pdf It is able to detected changepoints in both mean and variance.
How to detect changes in amplitude?
Try package ‘changepoint’, described here: http://www.lancs.ac.uk/~killick/Pub/KillickEckley2011.pdf It is able to detected changepoints in both mean and variance.
How to detect changes in amplitude? Try package ‘changepoint’, described here: http://www.lancs.ac.uk/~killick/Pub/KillickEckley2011.pdf It is able to detected changepoints in both mean and variance.
How to detect changes in amplitude? Try package ‘changepoint’, described here: http://www.lancs.ac.uk/~killick/Pub/KillickEckley2011.pdf It is able to detected changepoints in both mean and variance.