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
15,801
How to perform residual analysis for binary/dichotomous independent predictors in linear regression?
It's true that conventional residual plots are harder work in this case: it can be (much) more difficult to see whether the distributions are about the same. But there are easy alternatives here. You are just comparing two distributions, and there are many good ways to do that. Some possibilities are side-by-side or su...
How to perform residual analysis for binary/dichotomous independent predictors in linear regression?
It's true that conventional residual plots are harder work in this case: it can be (much) more difficult to see whether the distributions are about the same. But there are easy alternatives here. You
How to perform residual analysis for binary/dichotomous independent predictors in linear regression? It's true that conventional residual plots are harder work in this case: it can be (much) more difficult to see whether the distributions are about the same. But there are easy alternatives here. You are just comparing ...
How to perform residual analysis for binary/dichotomous independent predictors in linear regression? It's true that conventional residual plots are harder work in this case: it can be (much) more difficult to see whether the distributions are about the same. But there are easy alternatives here. You
15,802
How to uniformly project a hash to a fixed number of buckets
NB: putting in form the answer that emerged from discussion in comments so that it's easier to read for interested people (updated version) Suppose we have a source generating independent events that we want to distribute uniformly into $B$ buckets. The key steps are: hash each event $e$ to an integer $i$ of size $2^N...
How to uniformly project a hash to a fixed number of buckets
NB: putting in form the answer that emerged from discussion in comments so that it's easier to read for interested people (updated version) Suppose we have a source generating independent events that
How to uniformly project a hash to a fixed number of buckets NB: putting in form the answer that emerged from discussion in comments so that it's easier to read for interested people (updated version) Suppose we have a source generating independent events that we want to distribute uniformly into $B$ buckets. The key s...
How to uniformly project a hash to a fixed number of buckets NB: putting in form the answer that emerged from discussion in comments so that it's easier to read for interested people (updated version) Suppose we have a source generating independent events that
15,803
How to uniformly project a hash to a fixed number of buckets
I had a similar problem and came up with a different solution which may be faster and more easily implemented in any language. My first thought was to dispatch items quickly and uniformly in a fixed number of buckets, and also to be scalable, I should mimic randomness. So I coded this little function returning a float ...
How to uniformly project a hash to a fixed number of buckets
I had a similar problem and came up with a different solution which may be faster and more easily implemented in any language. My first thought was to dispatch items quickly and uniformly in a fixed n
How to uniformly project a hash to a fixed number of buckets I had a similar problem and came up with a different solution which may be faster and more easily implemented in any language. My first thought was to dispatch items quickly and uniformly in a fixed number of buckets, and also to be scalable, I should mimic r...
How to uniformly project a hash to a fixed number of buckets I had a similar problem and came up with a different solution which may be faster and more easily implemented in any language. My first thought was to dispatch items quickly and uniformly in a fixed n
15,804
How to uniformly project a hash to a fixed number of buckets
Here you can find a a branchless uniform bucket distribution that works with with bitwise operations.
How to uniformly project a hash to a fixed number of buckets
Here you can find a a branchless uniform bucket distribution that works with with bitwise operations.
How to uniformly project a hash to a fixed number of buckets Here you can find a a branchless uniform bucket distribution that works with with bitwise operations.
How to uniformly project a hash to a fixed number of buckets Here you can find a a branchless uniform bucket distribution that works with with bitwise operations.
15,805
Is there any difference between the terms "paired t-test" and "pairwise t-test"?
Roughly, paired t-test is a t-test in which each subject is compared with itself or, in other words, determines whether they differ from each other in a significant way under the assumptions that the paired differences are independent and identically normally distributed. Pairwise t-test, on the other hand is a functi...
Is there any difference between the terms "paired t-test" and "pairwise t-test"?
Roughly, paired t-test is a t-test in which each subject is compared with itself or, in other words, determines whether they differ from each other in a significant way under the assumptions that the
Is there any difference between the terms "paired t-test" and "pairwise t-test"? Roughly, paired t-test is a t-test in which each subject is compared with itself or, in other words, determines whether they differ from each other in a significant way under the assumptions that the paired differences are independent and ...
Is there any difference between the terms "paired t-test" and "pairwise t-test"? Roughly, paired t-test is a t-test in which each subject is compared with itself or, in other words, determines whether they differ from each other in a significant way under the assumptions that the
15,806
Modelling a Poisson distribution with overdispersion
for overdispersed poisson, use the negative binomial, which allows you to parameterize the variance as a function of the mean precisely. rnbinom(), etc. in R.
Modelling a Poisson distribution with overdispersion
for overdispersed poisson, use the negative binomial, which allows you to parameterize the variance as a function of the mean precisely. rnbinom(), etc. in R.
Modelling a Poisson distribution with overdispersion for overdispersed poisson, use the negative binomial, which allows you to parameterize the variance as a function of the mean precisely. rnbinom(), etc. in R.
Modelling a Poisson distribution with overdispersion for overdispersed poisson, use the negative binomial, which allows you to parameterize the variance as a function of the mean precisely. rnbinom(), etc. in R.
15,807
Modelling a Poisson distribution with overdispersion
If your mean value for the Poisson is 1500, then you're very close to a normal distribution; you might try using that as an approximation and then modelling the mean and variance separately.
Modelling a Poisson distribution with overdispersion
If your mean value for the Poisson is 1500, then you're very close to a normal distribution; you might try using that as an approximation and then modelling the mean and variance separately.
Modelling a Poisson distribution with overdispersion If your mean value for the Poisson is 1500, then you're very close to a normal distribution; you might try using that as an approximation and then modelling the mean and variance separately.
Modelling a Poisson distribution with overdispersion If your mean value for the Poisson is 1500, then you're very close to a normal distribution; you might try using that as an approximation and then modelling the mean and variance separately.
15,808
What is energy minimization in machine learning?
Energy-based models are a unified framework for representing many machine learning algorithms. They interpret inference as minimizing an energy function and learning as minimizing a loss functional. The energy function is a function of the configuration of latent variables, and the configuration of inputs provided in ...
What is energy minimization in machine learning?
Energy-based models are a unified framework for representing many machine learning algorithms. They interpret inference as minimizing an energy function and learning as minimizing a loss functional.
What is energy minimization in machine learning? Energy-based models are a unified framework for representing many machine learning algorithms. They interpret inference as minimizing an energy function and learning as minimizing a loss functional. The energy function is a function of the configuration of latent variab...
What is energy minimization in machine learning? Energy-based models are a unified framework for representing many machine learning algorithms. They interpret inference as minimizing an energy function and learning as minimizing a loss functional.
15,809
What is energy minimization in machine learning?
In signal detection literature, the energy of a signal $x_t$ is defined as $$ E = \Sigma x_t^2 $$ When predicting some response y from some features x, a very common and simple way to proceed is to minimise the sum of the squared errors $$ SSE= \Sigma (y-\hat{y})^2 $$ where $\hat{y}$ is the fitted response. Notice the ...
What is energy minimization in machine learning?
In signal detection literature, the energy of a signal $x_t$ is defined as $$ E = \Sigma x_t^2 $$ When predicting some response y from some features x, a very common and simple way to proceed is to mi
What is energy minimization in machine learning? In signal detection literature, the energy of a signal $x_t$ is defined as $$ E = \Sigma x_t^2 $$ When predicting some response y from some features x, a very common and simple way to proceed is to minimise the sum of the squared errors $$ SSE= \Sigma (y-\hat{y})^2 $$ wh...
What is energy minimization in machine learning? In signal detection literature, the energy of a signal $x_t$ is defined as $$ E = \Sigma x_t^2 $$ When predicting some response y from some features x, a very common and simple way to proceed is to mi
15,810
Do we really perform multivariate regression analysis with *million* coefficients/independent variables?
Does this really happen or is it a theoretical issue? It happens, see any popular deeplearning model for computer vision. Say, alexnet has a dense connection between 2048 and 2048 units, that's 4 million coefficients. What's the point of analyzing a million IVs? Does it really give us that much increase in value of i...
Do we really perform multivariate regression analysis with *million* coefficients/independent variab
Does this really happen or is it a theoretical issue? It happens, see any popular deeplearning model for computer vision. Say, alexnet has a dense connection between 2048 and 2048 units, that's 4 mil
Do we really perform multivariate regression analysis with *million* coefficients/independent variables? Does this really happen or is it a theoretical issue? It happens, see any popular deeplearning model for computer vision. Say, alexnet has a dense connection between 2048 and 2048 units, that's 4 million coefficien...
Do we really perform multivariate regression analysis with *million* coefficients/independent variab Does this really happen or is it a theoretical issue? It happens, see any popular deeplearning model for computer vision. Say, alexnet has a dense connection between 2048 and 2048 units, that's 4 mil
15,811
Is up- or down-sampling imbalanced data actually that effective? Why?
The short answer appears to be Yes: there is some evidence that upsampling of the minority class and/or downsampling of the majority class in a training set can somewhat improve out-of-sample AUC (area under the ROC curve, a threshold-independent metric) even on the unaltered, unbalanced data distribution. With that sa...
Is up- or down-sampling imbalanced data actually that effective? Why?
The short answer appears to be Yes: there is some evidence that upsampling of the minority class and/or downsampling of the majority class in a training set can somewhat improve out-of-sample AUC (are
Is up- or down-sampling imbalanced data actually that effective? Why? The short answer appears to be Yes: there is some evidence that upsampling of the minority class and/or downsampling of the majority class in a training set can somewhat improve out-of-sample AUC (area under the ROC curve, a threshold-independent met...
Is up- or down-sampling imbalanced data actually that effective? Why? The short answer appears to be Yes: there is some evidence that upsampling of the minority class and/or downsampling of the majority class in a training set can somewhat improve out-of-sample AUC (are
15,812
Is up- or down-sampling imbalanced data actually that effective? Why?
If you want to first to collect sample to do classification based on these results, then undersampling might be necessary even from the cost perpective. But in this case your estimation methods typically do not return population level probabilities, they are conditional on the sampling scheme which was used. Here is ...
Is up- or down-sampling imbalanced data actually that effective? Why?
If you want to first to collect sample to do classification based on these results, then undersampling might be necessary even from the cost perpective. But in this case your estimation methods typic
Is up- or down-sampling imbalanced data actually that effective? Why? If you want to first to collect sample to do classification based on these results, then undersampling might be necessary even from the cost perpective. But in this case your estimation methods typically do not return population level probabilities,...
Is up- or down-sampling imbalanced data actually that effective? Why? If you want to first to collect sample to do classification based on these results, then undersampling might be necessary even from the cost perpective. But in this case your estimation methods typic
15,813
Meaning of a convergence warning in glmer
Before going in to the code, allow me to give you a quick primer on trust region methods. Let $f(x)$ be your objective function and $x_k$ be your current iterate. Iteration $k$ of a generic trust region method looks something like this: Pick a maximum step size, $\Delta_k$ Build an model of $f(x)$ at $x = x_k$; call...
Meaning of a convergence warning in glmer
Before going in to the code, allow me to give you a quick primer on trust region methods. Let $f(x)$ be your objective function and $x_k$ be your current iterate. Iteration $k$ of a generic trust re
Meaning of a convergence warning in glmer Before going in to the code, allow me to give you a quick primer on trust region methods. Let $f(x)$ be your objective function and $x_k$ be your current iterate. Iteration $k$ of a generic trust region method looks something like this: Pick a maximum step size, $\Delta_k$ B...
Meaning of a convergence warning in glmer Before going in to the code, allow me to give you a quick primer on trust region methods. Let $f(x)$ be your objective function and $x_k$ be your current iterate. Iteration $k$ of a generic trust re
15,814
What's the deal with autocorrelation?
I think the author is probably talking about the residuals of the model. I argue this because of his statement about adding more fourier coefficients; if, as I believe, he is fitting a fourier model, then adding more coefficients will reduce the autocorrelation of the residuals at the expense of a higher CV. If you ha...
What's the deal with autocorrelation?
I think the author is probably talking about the residuals of the model. I argue this because of his statement about adding more fourier coefficients; if, as I believe, he is fitting a fourier model,
What's the deal with autocorrelation? I think the author is probably talking about the residuals of the model. I argue this because of his statement about adding more fourier coefficients; if, as I believe, he is fitting a fourier model, then adding more coefficients will reduce the autocorrelation of the residuals at ...
What's the deal with autocorrelation? I think the author is probably talking about the residuals of the model. I argue this because of his statement about adding more fourier coefficients; if, as I believe, he is fitting a fourier model,
15,815
What's the deal with autocorrelation?
I found this paper 'Spurious Regressions in Econometrics' helpful when trying to get my head around why eliminating trends is necessary. Essentially if two variables are trending then they'll co-vary, which is a recipe for trouble.
What's the deal with autocorrelation?
I found this paper 'Spurious Regressions in Econometrics' helpful when trying to get my head around why eliminating trends is necessary. Essentially if two variables are trending then they'll co-vary,
What's the deal with autocorrelation? I found this paper 'Spurious Regressions in Econometrics' helpful when trying to get my head around why eliminating trends is necessary. Essentially if two variables are trending then they'll co-vary, which is a recipe for trouble.
What's the deal with autocorrelation? I found this paper 'Spurious Regressions in Econometrics' helpful when trying to get my head around why eliminating trends is necessary. Essentially if two variables are trending then they'll co-vary,
15,816
Learning statistical concepts through data analysis exercises
As I have to explain variable selection methods quite often, not in a teaching context, but for non-statisticians requesting aid with their research, I love this extremely simple example that illustrates why single variable selection is not necessarily a good idea. If you have this dataset: y X1 x2 1 1 ...
Learning statistical concepts through data analysis exercises
As I have to explain variable selection methods quite often, not in a teaching context, but for non-statisticians requesting aid with their research, I love this extremely simple example that illustra
Learning statistical concepts through data analysis exercises As I have to explain variable selection methods quite often, not in a teaching context, but for non-statisticians requesting aid with their research, I love this extremely simple example that illustrates why single variable selection is not necessarily a goo...
Learning statistical concepts through data analysis exercises As I have to explain variable selection methods quite often, not in a teaching context, but for non-statisticians requesting aid with their research, I love this extremely simple example that illustra
15,817
Learning statistical concepts through data analysis exercises
Multiple Regression Coefficients and the Expected Sign Fallacy One of my favorite illustrations of a statistical concept through a data analysis exercise is the deconstruction of a multiple regression into multiple bivariate regressions. Objectives To clarify the meaning of regression coefficients in the presence of...
Learning statistical concepts through data analysis exercises
Multiple Regression Coefficients and the Expected Sign Fallacy One of my favorite illustrations of a statistical concept through a data analysis exercise is the deconstruction of a multiple regression
Learning statistical concepts through data analysis exercises Multiple Regression Coefficients and the Expected Sign Fallacy One of my favorite illustrations of a statistical concept through a data analysis exercise is the deconstruction of a multiple regression into multiple bivariate regressions. Objectives To cla...
Learning statistical concepts through data analysis exercises Multiple Regression Coefficients and the Expected Sign Fallacy One of my favorite illustrations of a statistical concept through a data analysis exercise is the deconstruction of a multiple regression
15,818
How meaningful is the connection between MLE and cross entropy in deep learning?
Neural nets don't necessarily give probabilities as outputs, but they can be designed to do this. To be interpreted as probabilities, a set of values must be nonnegative and sum to one. Designing a network to output probabilities typically amounts to choosing an output layer that imposes these constraints. For example,...
How meaningful is the connection between MLE and cross entropy in deep learning?
Neural nets don't necessarily give probabilities as outputs, but they can be designed to do this. To be interpreted as probabilities, a set of values must be nonnegative and sum to one. Designing a ne
How meaningful is the connection between MLE and cross entropy in deep learning? Neural nets don't necessarily give probabilities as outputs, but they can be designed to do this. To be interpreted as probabilities, a set of values must be nonnegative and sum to one. Designing a network to output probabilities typically...
How meaningful is the connection between MLE and cross entropy in deep learning? Neural nets don't necessarily give probabilities as outputs, but they can be designed to do this. To be interpreted as probabilities, a set of values must be nonnegative and sum to one. Designing a ne
15,819
How meaningful is the connection between MLE and cross entropy in deep learning?
I'll answer from a slightly more general perspective, concerning the nature of how, when, and why we can consider NN outputs to be probability distributions. In the sense that the softmax enforces the outputs to sum to 1 and also be non-negative, the output of the network is a discrete probability distribution over the...
How meaningful is the connection between MLE and cross entropy in deep learning?
I'll answer from a slightly more general perspective, concerning the nature of how, when, and why we can consider NN outputs to be probability distributions. In the sense that the softmax enforces the
How meaningful is the connection between MLE and cross entropy in deep learning? I'll answer from a slightly more general perspective, concerning the nature of how, when, and why we can consider NN outputs to be probability distributions. In the sense that the softmax enforces the outputs to sum to 1 and also be non-ne...
How meaningful is the connection between MLE and cross entropy in deep learning? I'll answer from a slightly more general perspective, concerning the nature of how, when, and why we can consider NN outputs to be probability distributions. In the sense that the softmax enforces the
15,820
How meaningful is the connection between MLE and cross entropy in deep learning?
Feed-forward neural networks approximate the true class probabilities when trained properly. In 1991, Richard & Lippmann proved that feed-forward neural networks approach posterior class probabilities, when trained with {0,1} class-indicator target patterns [Richard M. D., & Lippmann R. P. (1991). Neural network class...
How meaningful is the connection between MLE and cross entropy in deep learning?
Feed-forward neural networks approximate the true class probabilities when trained properly. In 1991, Richard & Lippmann proved that feed-forward neural networks approach posterior class probabilitie
How meaningful is the connection between MLE and cross entropy in deep learning? Feed-forward neural networks approximate the true class probabilities when trained properly. In 1991, Richard & Lippmann proved that feed-forward neural networks approach posterior class probabilities, when trained with {0,1} class-indica...
How meaningful is the connection between MLE and cross entropy in deep learning? Feed-forward neural networks approximate the true class probabilities when trained properly. In 1991, Richard & Lippmann proved that feed-forward neural networks approach posterior class probabilitie
15,821
How meaningful is the connection between MLE and cross entropy in deep learning?
The log-likelihood is not directly linked to the entropy in the context of your question. The similarity is superficial: both have the sums of logarithms of probability-like quantities. The logarithm in log-likelihood (MLE) is done purely for numerical calculation reasons. The product of probabilities can be a very sma...
How meaningful is the connection between MLE and cross entropy in deep learning?
The log-likelihood is not directly linked to the entropy in the context of your question. The similarity is superficial: both have the sums of logarithms of probability-like quantities. The logarithm
How meaningful is the connection between MLE and cross entropy in deep learning? The log-likelihood is not directly linked to the entropy in the context of your question. The similarity is superficial: both have the sums of logarithms of probability-like quantities. The logarithm in log-likelihood (MLE) is done purely ...
How meaningful is the connection between MLE and cross entropy in deep learning? The log-likelihood is not directly linked to the entropy in the context of your question. The similarity is superficial: both have the sums of logarithms of probability-like quantities. The logarithm
15,822
What are the difference between Dice, Jaccard, and overlap coefficients? [closed]
From the wikipedia page: $$J=\frac{D}{2-D} \;\; \text{and}\;\; D=\frac{2J}{J+1}$$ where $D$ is the Dice Coefficient and $J$ is the Jacard Index. In my opinion, the Dice Coefficient is more intuitive because it can be seen as the percentage of overlap between the two sets, that is a number between 0 and 1. As for the Ov...
What are the difference between Dice, Jaccard, and overlap coefficients? [closed]
From the wikipedia page: $$J=\frac{D}{2-D} \;\; \text{and}\;\; D=\frac{2J}{J+1}$$ where $D$ is the Dice Coefficient and $J$ is the Jacard Index. In my opinion, the Dice Coefficient is more intuitive b
What are the difference between Dice, Jaccard, and overlap coefficients? [closed] From the wikipedia page: $$J=\frac{D}{2-D} \;\; \text{and}\;\; D=\frac{2J}{J+1}$$ where $D$ is the Dice Coefficient and $J$ is the Jacard Index. In my opinion, the Dice Coefficient is more intuitive because it can be seen as the percentag...
What are the difference between Dice, Jaccard, and overlap coefficients? [closed] From the wikipedia page: $$J=\frac{D}{2-D} \;\; \text{and}\;\; D=\frac{2J}{J+1}$$ where $D$ is the Dice Coefficient and $J$ is the Jacard Index. In my opinion, the Dice Coefficient is more intuitive b
15,823
Why is it called the "standard" deviation?
Pearson made up this term in 1894 paper "On the dissection of asymmetrical frequency-curves", here's the pdf. Also, he wrote it with a hyphen, "standard-deviation". He didn't bother to explain us why he chose the term. Gauss and Airy called it mean error (mittlerer Fehler) and error of mean square. In physics it's usua...
Why is it called the "standard" deviation?
Pearson made up this term in 1894 paper "On the dissection of asymmetrical frequency-curves", here's the pdf. Also, he wrote it with a hyphen, "standard-deviation". He didn't bother to explain us why
Why is it called the "standard" deviation? Pearson made up this term in 1894 paper "On the dissection of asymmetrical frequency-curves", here's the pdf. Also, he wrote it with a hyphen, "standard-deviation". He didn't bother to explain us why he chose the term. Gauss and Airy called it mean error (mittlerer Fehler) and...
Why is it called the "standard" deviation? Pearson made up this term in 1894 paper "On the dissection of asymmetrical frequency-curves", here's the pdf. Also, he wrote it with a hyphen, "standard-deviation". He didn't bother to explain us why
15,824
Why is it called the "standard" deviation?
I guess that we can have an idea of why a standard deviation is called "standard" by looking at the synonyms of this word (see here). Some of them, like "typical" or "average", make clear the fact that a standard deviation is conceptually a typical or an average deviation to the mean, even if technically speaking you h...
Why is it called the "standard" deviation?
I guess that we can have an idea of why a standard deviation is called "standard" by looking at the synonyms of this word (see here). Some of them, like "typical" or "average", make clear the fact tha
Why is it called the "standard" deviation? I guess that we can have an idea of why a standard deviation is called "standard" by looking at the synonyms of this word (see here). Some of them, like "typical" or "average", make clear the fact that a standard deviation is conceptually a typical or an average deviation to t...
Why is it called the "standard" deviation? I guess that we can have an idea of why a standard deviation is called "standard" by looking at the synonyms of this word (see here). Some of them, like "typical" or "average", make clear the fact tha
15,825
Arima time series forecast (auto.arima) with multiple exogeneous variables in R
If your external regressors are causal for $y$, but not the other way around and do not cause each other, then ARIMA is definitely appropriate. VAR makes sense if your different time series all depend on each other. For auto.arima() to work with external regressors, collect your regressors into a matrix X, which you fe...
Arima time series forecast (auto.arima) with multiple exogeneous variables in R
If your external regressors are causal for $y$, but not the other way around and do not cause each other, then ARIMA is definitely appropriate. VAR makes sense if your different time series all depend
Arima time series forecast (auto.arima) with multiple exogeneous variables in R If your external regressors are causal for $y$, but not the other way around and do not cause each other, then ARIMA is definitely appropriate. VAR makes sense if your different time series all depend on each other. For auto.arima() to work...
Arima time series forecast (auto.arima) with multiple exogeneous variables in R If your external regressors are causal for $y$, but not the other way around and do not cause each other, then ARIMA is definitely appropriate. VAR makes sense if your different time series all depend
15,826
Propensity score matching with panel data
You basically have to create a wide format dataset with the all the characteristics that are relevant for the matching procedure, perform the matching on this cross-sectional dataset, and then use the ID to identify the matched pair in the panel dataset. Here are some more details: Use reshape to create a wide format ...
Propensity score matching with panel data
You basically have to create a wide format dataset with the all the characteristics that are relevant for the matching procedure, perform the matching on this cross-sectional dataset, and then use the
Propensity score matching with panel data You basically have to create a wide format dataset with the all the characteristics that are relevant for the matching procedure, perform the matching on this cross-sectional dataset, and then use the ID to identify the matched pair in the panel dataset. Here are some more deta...
Propensity score matching with panel data You basically have to create a wide format dataset with the all the characteristics that are relevant for the matching procedure, perform the matching on this cross-sectional dataset, and then use the
15,827
Propensity score matching with panel data
There's no way to do that in Stata or any other software that I am aware of. If you're trying to patch up a biased matching estimator with panel data techniques, here's one approach that may work. If you can assume that matching takes care of some, but not all of the selection bias, but that the bias largely remains co...
Propensity score matching with panel data
There's no way to do that in Stata or any other software that I am aware of. If you're trying to patch up a biased matching estimator with panel data techniques, here's one approach that may work. If
Propensity score matching with panel data There's no way to do that in Stata or any other software that I am aware of. If you're trying to patch up a biased matching estimator with panel data techniques, here's one approach that may work. If you can assume that matching takes care of some, but not all of the selection ...
Propensity score matching with panel data There's no way to do that in Stata or any other software that I am aware of. If you're trying to patch up a biased matching estimator with panel data techniques, here's one approach that may work. If
15,828
Propensity score matching with panel data
Steps: As it has been mentioned in detail by Greg, you can use a cross-sectional dataset, either on pre-treatment means or on a sepecific pre-treatment period to generate the matching. Using the whole panel you assign indicator variables for a. treatedIndividual b. treatedPeriod, the latter is equal to zero as soon ...
Propensity score matching with panel data
Steps: As it has been mentioned in detail by Greg, you can use a cross-sectional dataset, either on pre-treatment means or on a sepecific pre-treatment period to generate the matching. Using the wh
Propensity score matching with panel data Steps: As it has been mentioned in detail by Greg, you can use a cross-sectional dataset, either on pre-treatment means or on a sepecific pre-treatment period to generate the matching. Using the whole panel you assign indicator variables for a. treatedIndividual b. treatedPe...
Propensity score matching with panel data Steps: As it has been mentioned in detail by Greg, you can use a cross-sectional dataset, either on pre-treatment means or on a sepecific pre-treatment period to generate the matching. Using the wh
15,829
Propensity score matching with panel data
Did you consider to use the nnmatch command? I use this command and it is a pretty comprehensive one. It does take into account different matching algorithms and also cases, in which the propensity score is the same for some control group individuals. Of course, the treatment of this case depends on the matching algori...
Propensity score matching with panel data
Did you consider to use the nnmatch command? I use this command and it is a pretty comprehensive one. It does take into account different matching algorithms and also cases, in which the propensity sc
Propensity score matching with panel data Did you consider to use the nnmatch command? I use this command and it is a pretty comprehensive one. It does take into account different matching algorithms and also cases, in which the propensity score is the same for some control group individuals. Of course, the treatment o...
Propensity score matching with panel data Did you consider to use the nnmatch command? I use this command and it is a pretty comprehensive one. It does take into account different matching algorithms and also cases, in which the propensity sc
15,830
Conditional expectation of R-squared
Any linear model can be written $\boxed{Y=\mu+\sigma G}$ where $G$ has the standard normal distribution on $\mathbb{R}^n$ and $\mu$ is assumed to belong to a linear subspace $W$ of $\mathbb{R}^n$. In your case $W=\text{Im}(X)$. Let $[1] \subset W$ be the one-dimensional linear subspace generated by the vector $(1,1,\l...
Conditional expectation of R-squared
Any linear model can be written $\boxed{Y=\mu+\sigma G}$ where $G$ has the standard normal distribution on $\mathbb{R}^n$ and $\mu$ is assumed to belong to a linear subspace $W$ of $\mathbb{R}^n$. In
Conditional expectation of R-squared Any linear model can be written $\boxed{Y=\mu+\sigma G}$ where $G$ has the standard normal distribution on $\mathbb{R}^n$ and $\mu$ is assumed to belong to a linear subspace $W$ of $\mathbb{R}^n$. In your case $W=\text{Im}(X)$. Let $[1] \subset W$ be the one-dimensional linear subs...
Conditional expectation of R-squared Any linear model can be written $\boxed{Y=\mu+\sigma G}$ where $G$ has the standard normal distribution on $\mathbb{R}^n$ and $\mu$ is assumed to belong to a linear subspace $W$ of $\mathbb{R}^n$. In
15,831
Frequentism and priors
With respect to Robby McKilliam's comment: I think the difficulty a frequentist would have with this lies in the definition of "prior knowledge", not so much with the ability to incorporate prior knowledge in a model. For example, consider estimating the probability that a given coin will come up heads. Let us assum...
Frequentism and priors
With respect to Robby McKilliam's comment: I think the difficulty a frequentist would have with this lies in the definition of "prior knowledge", not so much with the ability to incorporate prior kno
Frequentism and priors With respect to Robby McKilliam's comment: I think the difficulty a frequentist would have with this lies in the definition of "prior knowledge", not so much with the ability to incorporate prior knowledge in a model. For example, consider estimating the probability that a given coin will come ...
Frequentism and priors With respect to Robby McKilliam's comment: I think the difficulty a frequentist would have with this lies in the definition of "prior knowledge", not so much with the ability to incorporate prior kno
15,832
Frequentism and priors
For the purpose of answering this question it's useful to define frequentism as "interest the properties of the sampling distribution of functions of the data." Such functions could be point estimators, p-values of test statistics, confidence intervals, Neyman-Pearson test outcomes, or basically anything else you can t...
Frequentism and priors
For the purpose of answering this question it's useful to define frequentism as "interest the properties of the sampling distribution of functions of the data." Such functions could be point estimator
Frequentism and priors For the purpose of answering this question it's useful to define frequentism as "interest the properties of the sampling distribution of functions of the data." Such functions could be point estimators, p-values of test statistics, confidence intervals, Neyman-Pearson test outcomes, or basically ...
Frequentism and priors For the purpose of answering this question it's useful to define frequentism as "interest the properties of the sampling distribution of functions of the data." Such functions could be point estimator
15,833
War stories where wrong decisions were made based on statistical information?
This isn't exactly what you're asking for, but I think you'd like David Freedman's work. He calls BS on misapplication of statistical tests, etc... See here: http://www.stat.berkeley.edu/~freedman/. One of my favorites is “What is the probability of an earthquake?”.
War stories where wrong decisions were made based on statistical information?
This isn't exactly what you're asking for, but I think you'd like David Freedman's work. He calls BS on misapplication of statistical tests, etc... See here: http://www.stat.berkeley.edu/~freedman/. O
War stories where wrong decisions were made based on statistical information? This isn't exactly what you're asking for, but I think you'd like David Freedman's work. He calls BS on misapplication of statistical tests, etc... See here: http://www.stat.berkeley.edu/~freedman/. One of my favorites is “What is the probabi...
War stories where wrong decisions were made based on statistical information? This isn't exactly what you're asking for, but I think you'd like David Freedman's work. He calls BS on misapplication of statistical tests, etc... See here: http://www.stat.berkeley.edu/~freedman/. O
15,834
War stories where wrong decisions were made based on statistical information?
You might check out a recent presentation on SSRN by Bernard Black, "Bloopers: How (Mostly) Smart People Get Causal Inference Wrong." http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1663404 I will say that I also admire David Freedman and appreciate his work. Though I was a UC Berkeley grad student while he was here...
War stories where wrong decisions were made based on statistical information?
You might check out a recent presentation on SSRN by Bernard Black, "Bloopers: How (Mostly) Smart People Get Causal Inference Wrong." http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1663404 I will
War stories where wrong decisions were made based on statistical information? You might check out a recent presentation on SSRN by Bernard Black, "Bloopers: How (Mostly) Smart People Get Causal Inference Wrong." http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1663404 I will say that I also admire David Freedman and ...
War stories where wrong decisions were made based on statistical information? You might check out a recent presentation on SSRN by Bernard Black, "Bloopers: How (Mostly) Smart People Get Causal Inference Wrong." http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1663404 I will
15,835
War stories where wrong decisions were made based on statistical information?
This thread is now ancient but it may still be worth posting the results of a recent study titled, A bot crawled thousands of studies looking for simple math errors. The results are concerning. It's not exactly a war story but it does illustrate the rampant errors inherent in published, peer reviewed papers. http://www...
War stories where wrong decisions were made based on statistical information?
This thread is now ancient but it may still be worth posting the results of a recent study titled, A bot crawled thousands of studies looking for simple math errors. The results are concerning. It's n
War stories where wrong decisions were made based on statistical information? This thread is now ancient but it may still be worth posting the results of a recent study titled, A bot crawled thousands of studies looking for simple math errors. The results are concerning. It's not exactly a war story but it does illustr...
War stories where wrong decisions were made based on statistical information? This thread is now ancient but it may still be worth posting the results of a recent study titled, A bot crawled thousands of studies looking for simple math errors. The results are concerning. It's n
15,836
War stories where wrong decisions were made based on statistical information?
The sad case of Sally Clark springs to mind. In 1999, she was wrongfully convicted of murdering her two sons after it was erroneously concluded by Professor Sir Roy Meadow that the chances of both of her sons dying from sudden infant death syndrome (SIDS) were 1 in 73 million, and his now discredited eponymous law: On...
War stories where wrong decisions were made based on statistical information?
The sad case of Sally Clark springs to mind. In 1999, she was wrongfully convicted of murdering her two sons after it was erroneously concluded by Professor Sir Roy Meadow that the chances of both of
War stories where wrong decisions were made based on statistical information? The sad case of Sally Clark springs to mind. In 1999, she was wrongfully convicted of murdering her two sons after it was erroneously concluded by Professor Sir Roy Meadow that the chances of both of her sons dying from sudden infant death sy...
War stories where wrong decisions were made based on statistical information? The sad case of Sally Clark springs to mind. In 1999, she was wrongfully convicted of murdering her two sons after it was erroneously concluded by Professor Sir Roy Meadow that the chances of both of
15,837
Testing for coefficients significance in Lasso logistic regression
The problem with using the usual significance tests is that they assume the null that is that there are random variables, with no relationship with the outcome variables. However what you have with lasso, is a bunch of random variables, from which you select the best ones with the lasso, also the betas are shrunk. So y...
Testing for coefficients significance in Lasso logistic regression
The problem with using the usual significance tests is that they assume the null that is that there are random variables, with no relationship with the outcome variables. However what you have with la
Testing for coefficients significance in Lasso logistic regression The problem with using the usual significance tests is that they assume the null that is that there are random variables, with no relationship with the outcome variables. However what you have with lasso, is a bunch of random variables, from which you s...
Testing for coefficients significance in Lasso logistic regression The problem with using the usual significance tests is that they assume the null that is that there are random variables, with no relationship with the outcome variables. However what you have with la
15,838
Testing for coefficients significance in Lasso logistic regression
The issue with performing inference after model selection is that you are selecting the most predictive variables and then performing inference as if they were selected independently of the data. It is possible to show that refitting the regression model after doing model selection with the lasso (or any other model se...
Testing for coefficients significance in Lasso logistic regression
The issue with performing inference after model selection is that you are selecting the most predictive variables and then performing inference as if they were selected independently of the data. It i
Testing for coefficients significance in Lasso logistic regression The issue with performing inference after model selection is that you are selecting the most predictive variables and then performing inference as if they were selected independently of the data. It is possible to show that refitting the regression mode...
Testing for coefficients significance in Lasso logistic regression The issue with performing inference after model selection is that you are selecting the most predictive variables and then performing inference as if they were selected independently of the data. It i
15,839
Residual standard error difference between optim and glm
The issues is that the standard errors comes from $$\hat\sigma^2 (X^\top X)^{-1}$$ where $\hat\sigma^2$ is the unbiased estimator and not the MLE. See summary.lm summary.lm #R function (object, correlation = FALSE, symbolic.cor = FALSE, #R ...) #R { #R z <- object #R p <- z$rank #R rdf <- z$df.residual ...
Residual standard error difference between optim and glm
The issues is that the standard errors comes from $$\hat\sigma^2 (X^\top X)^{-1}$$ where $\hat\sigma^2$ is the unbiased estimator and not the MLE. See summary.lm summary.lm #R function (object, corre
Residual standard error difference between optim and glm The issues is that the standard errors comes from $$\hat\sigma^2 (X^\top X)^{-1}$$ where $\hat\sigma^2$ is the unbiased estimator and not the MLE. See summary.lm summary.lm #R function (object, correlation = FALSE, symbolic.cor = FALSE, #R ...) #R { #R ...
Residual standard error difference between optim and glm The issues is that the standard errors comes from $$\hat\sigma^2 (X^\top X)^{-1}$$ where $\hat\sigma^2$ is the unbiased estimator and not the MLE. See summary.lm summary.lm #R function (object, corre
15,840
Residual standard error difference between optim and glm
If i understood well, the solution is simple: optim maximizes the likelihood, by dividing the sum of squared residuals by $n$. What you want is to divide the sum of squares by $n-k+1$. So undo the division by $n$ and divide by $n-k+1$: sqrt(4.717216^2*4/2) = 6.671151
Residual standard error difference between optim and glm
If i understood well, the solution is simple: optim maximizes the likelihood, by dividing the sum of squared residuals by $n$. What you want is to divide the sum of squares by $n-k+1$. So undo the div
Residual standard error difference between optim and glm If i understood well, the solution is simple: optim maximizes the likelihood, by dividing the sum of squared residuals by $n$. What you want is to divide the sum of squares by $n-k+1$. So undo the division by $n$ and divide by $n-k+1$: sqrt(4.717216^2*4/2) = 6.67...
Residual standard error difference between optim and glm If i understood well, the solution is simple: optim maximizes the likelihood, by dividing the sum of squared residuals by $n$. What you want is to divide the sum of squares by $n-k+1$. So undo the div
15,841
The difference between logistic regression and support vector machines?
You are right if you are talking about hard SVM and the two classes are linearly separable. LR finds any solution that separates the two classes. Hard SVM finds "the" solution among all possible ones that has the maximum margin. In case of soft SVM and the classes not being linearly separable, you are still right w...
The difference between logistic regression and support vector machines?
You are right if you are talking about hard SVM and the two classes are linearly separable. LR finds any solution that separates the two classes. Hard SVM finds "the" solution among all possible one
The difference between logistic regression and support vector machines? You are right if you are talking about hard SVM and the two classes are linearly separable. LR finds any solution that separates the two classes. Hard SVM finds "the" solution among all possible ones that has the maximum margin. In case of soft...
The difference between logistic regression and support vector machines? You are right if you are talking about hard SVM and the two classes are linearly separable. LR finds any solution that separates the two classes. Hard SVM finds "the" solution among all possible one
15,842
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metropolis
Here you go - three examples. I've made the code much less efficient than it would be in a real application in order to make the logic clearer (I hope.) # We'll assume estimation of a Poisson mean as a function of x x <- runif(100) y <- rpois(100,5*x) # beta = 5 where mean(y[i]) = beta*x[i] # Prior distribution on l...
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metrop
Here you go - three examples. I've made the code much less efficient than it would be in a real application in order to make the logic clearer (I hope.) # We'll assume estimation of a Poisson mean as
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metropolis Here you go - three examples. I've made the code much less efficient than it would be in a real application in order to make the logic clearer (I hope.) # We'll assume estimation of a Poisson mean as a function of ...
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metrop Here you go - three examples. I've made the code much less efficient than it would be in a real application in order to make the logic clearer (I hope.) # We'll assume estimation of a Poisson mean as
15,843
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metropolis
See: By construction, the algorithm does not depend on the normalization constant, since what matters is the ratio of the pdf's. The variation of the algorithm in which the proposal pdf $q()$ is not symmetric is due to Hasting (1970) and for this reason the algorithm is often also called Metropolis-Hasting. Moreover, ...
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metrop
See: By construction, the algorithm does not depend on the normalization constant, since what matters is the ratio of the pdf's. The variation of the algorithm in which the proposal pdf $q()$ is not
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metropolis See: By construction, the algorithm does not depend on the normalization constant, since what matters is the ratio of the pdf's. The variation of the algorithm in which the proposal pdf $q()$ is not symmetric is du...
Confused with MCMC Metropolis-Hastings variations: Random-Walk, Non-Random-Walk, Independent, Metrop See: By construction, the algorithm does not depend on the normalization constant, since what matters is the ratio of the pdf's. The variation of the algorithm in which the proposal pdf $q()$ is not
15,844
E-M, is there an intuitive explanation?
Just to save some typing, call the observed data $X$, the missing data $Z$ (e.g. the hidden states of the HMM), and the parameter vector we're trying to find $Q$ (e.g. transition/emission probabilities). The intuitive explanation is that we basically cheat, pretend for a moment we know $Q$ so we can find a conditional ...
E-M, is there an intuitive explanation?
Just to save some typing, call the observed data $X$, the missing data $Z$ (e.g. the hidden states of the HMM), and the parameter vector we're trying to find $Q$ (e.g. transition/emission probabilitie
E-M, is there an intuitive explanation? Just to save some typing, call the observed data $X$, the missing data $Z$ (e.g. the hidden states of the HMM), and the parameter vector we're trying to find $Q$ (e.g. transition/emission probabilities). The intuitive explanation is that we basically cheat, pretend for a moment w...
E-M, is there an intuitive explanation? Just to save some typing, call the observed data $X$, the missing data $Z$ (e.g. the hidden states of the HMM), and the parameter vector we're trying to find $Q$ (e.g. transition/emission probabilitie
15,845
Literature review on non-linear regression
The book "Nonlinear Regression Analysis and Its Applications" (2007) by Bates & Watts springs to mind as an immediate suggestion. It is co-authored by one of the masters of regression algorithm design (D. Bates). Note that is is not exactly fresh; the edition I link is published on 2007 but most of the material is from...
Literature review on non-linear regression
The book "Nonlinear Regression Analysis and Its Applications" (2007) by Bates & Watts springs to mind as an immediate suggestion. It is co-authored by one of the masters of regression algorithm design
Literature review on non-linear regression The book "Nonlinear Regression Analysis and Its Applications" (2007) by Bates & Watts springs to mind as an immediate suggestion. It is co-authored by one of the masters of regression algorithm design (D. Bates). Note that is is not exactly fresh; the edition I link is publish...
Literature review on non-linear regression The book "Nonlinear Regression Analysis and Its Applications" (2007) by Bates & Watts springs to mind as an immediate suggestion. It is co-authored by one of the masters of regression algorithm design
15,846
Literature review on non-linear regression
Non-linear regression is a mature and broad topic, that's why I doubt that there are many recent review papers. The only papers that I can think of are: Motulsky HJ, Ransnas LA: "Fitting Curves to Data Using Nonlinear Regression: A Practical and Nonmathematical Review." The FASEB Journal, 1(5), 365-374 <- As the name s...
Literature review on non-linear regression
Non-linear regression is a mature and broad topic, that's why I doubt that there are many recent review papers. The only papers that I can think of are: Motulsky HJ, Ransnas LA: "Fitting Curves to Dat
Literature review on non-linear regression Non-linear regression is a mature and broad topic, that's why I doubt that there are many recent review papers. The only papers that I can think of are: Motulsky HJ, Ransnas LA: "Fitting Curves to Data Using Nonlinear Regression: A Practical and Nonmathematical Review." The FA...
Literature review on non-linear regression Non-linear regression is a mature and broad topic, that's why I doubt that there are many recent review papers. The only papers that I can think of are: Motulsky HJ, Ransnas LA: "Fitting Curves to Dat
15,847
lmer with multiply imputed data
You can do this somewhat by hand if by taking advantage of the lapply functionality in R and the list-structure returned by the Amelia multiple imputation package. Here's a quick example script. library(Amelia) library(lme4) library(merTools) library(plyr) # for collapsing estimates Amelia is similar to mice so you c...
lmer with multiply imputed data
You can do this somewhat by hand if by taking advantage of the lapply functionality in R and the list-structure returned by the Amelia multiple imputation package. Here's a quick example script. libr
lmer with multiply imputed data You can do this somewhat by hand if by taking advantage of the lapply functionality in R and the list-structure returned by the Amelia multiple imputation package. Here's a quick example script. library(Amelia) library(lme4) library(merTools) library(plyr) # for collapsing estimates Am...
lmer with multiply imputed data You can do this somewhat by hand if by taking advantage of the lapply functionality in R and the list-structure returned by the Amelia multiple imputation package. Here's a quick example script. libr
15,848
lmer with multiply imputed data
You can also use the testEstimates function after imputation using mice with the following code: testEstimates(as.mitml.result(fm1), var.comp = T)$var.comp
lmer with multiply imputed data
You can also use the testEstimates function after imputation using mice with the following code: testEstimates(as.mitml.result(fm1), var.comp = T)$var.comp
lmer with multiply imputed data You can also use the testEstimates function after imputation using mice with the following code: testEstimates(as.mitml.result(fm1), var.comp = T)$var.comp
lmer with multiply imputed data You can also use the testEstimates function after imputation using mice with the following code: testEstimates(as.mitml.result(fm1), var.comp = T)$var.comp
15,849
What is the intuition behind exchangeable samples under the null hypothesis?
First, the non-figurative description: Exchangability means that the joint distribution is invariant to permutations of the values of each variable in the joint distribution (i.e, $f_{XYZ}(x = 1, y=3, z=2)=f_{XYZ}(x=3,y=2,z=1)$, etc). If this is not the case then counting permutations is not a valid way of testing the ...
What is the intuition behind exchangeable samples under the null hypothesis?
First, the non-figurative description: Exchangability means that the joint distribution is invariant to permutations of the values of each variable in the joint distribution (i.e, $f_{XYZ}(x = 1, y=3,
What is the intuition behind exchangeable samples under the null hypothesis? First, the non-figurative description: Exchangability means that the joint distribution is invariant to permutations of the values of each variable in the joint distribution (i.e, $f_{XYZ}(x = 1, y=3, z=2)=f_{XYZ}(x=3,y=2,z=1)$, etc). If this ...
What is the intuition behind exchangeable samples under the null hypothesis? First, the non-figurative description: Exchangability means that the joint distribution is invariant to permutations of the values of each variable in the joint distribution (i.e, $f_{XYZ}(x = 1, y=3,
15,850
Is the sum of two decision trees equivalent to a single decision tree?
Yes, the weighted sum of a regression trees is equivalent to a single (deeper) regression tree. Universal function approximator A regression tree is a universal function approximator (see e.g. cstheory). Most research on universal function approximations is done on artifical neural networks with one hidden layer (read...
Is the sum of two decision trees equivalent to a single decision tree?
Yes, the weighted sum of a regression trees is equivalent to a single (deeper) regression tree. Universal function approximator A regression tree is a universal function approximator (see e.g. cstheo
Is the sum of two decision trees equivalent to a single decision tree? Yes, the weighted sum of a regression trees is equivalent to a single (deeper) regression tree. Universal function approximator A regression tree is a universal function approximator (see e.g. cstheory). Most research on universal function approxim...
Is the sum of two decision trees equivalent to a single decision tree? Yes, the weighted sum of a regression trees is equivalent to a single (deeper) regression tree. Universal function approximator A regression tree is a universal function approximator (see e.g. cstheo
15,851
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes)
Consider a simple linear mixed model, e.g. a random intercept model where we estimate the dependency of $y$ on $x$ in different subjects, and assume that each subject has their own random intercept:$$y = a + bx + c_i + \epsilon.$$ Here intercepts $c_i$ are modeled as coming from a Gaussian distribution $$c_i\sim \mathc...
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes)
Consider a simple linear mixed model, e.g. a random intercept model where we estimate the dependency of $y$ on $x$ in different subjects, and assume that each subject has their own random intercept:$$
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes) Consider a simple linear mixed model, e.g. a random intercept model where we estimate the dependency of $y$ on $x$ in different subjects, and assume that each subject has their own random intercept:$$y = a + bx + c_i + \eps...
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes) Consider a simple linear mixed model, e.g. a random intercept model where we estimate the dependency of $y$ on $x$ in different subjects, and assume that each subject has their own random intercept:$$
15,852
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes)
You can easily estimate variance and covariance parameters without relying on random-effects by using fixed-effects (see here for a discussion fixed-effects vs. random-effects; be aware of the fact that there are different definitions of these terms). Fixed-effects can be easily derived by adding a (binary) indicator ...
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes)
You can easily estimate variance and covariance parameters without relying on random-effects by using fixed-effects (see here for a discussion fixed-effects vs. random-effects; be aware of the fact th
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes) You can easily estimate variance and covariance parameters without relying on random-effects by using fixed-effects (see here for a discussion fixed-effects vs. random-effects; be aware of the fact that there are different ...
Intuition about parameter estimation in mixed models (variance parameters vs. conditional modes) You can easily estimate variance and covariance parameters without relying on random-effects by using fixed-effects (see here for a discussion fixed-effects vs. random-effects; be aware of the fact th
15,853
Neural Network: Why can't I overfit?
The reason to try to overfit a data set is in order to understand the model capacity needed in order to represent your dataset. If our model capacity is too low, you won't be able to represent your data set. When you increase the model capacity until you can fully represent your data set, you know you found the minimal...
Neural Network: Why can't I overfit?
The reason to try to overfit a data set is in order to understand the model capacity needed in order to represent your dataset. If our model capacity is too low, you won't be able to represent your da
Neural Network: Why can't I overfit? The reason to try to overfit a data set is in order to understand the model capacity needed in order to represent your dataset. If our model capacity is too low, you won't be able to represent your data set. When you increase the model capacity until you can fully represent your dat...
Neural Network: Why can't I overfit? The reason to try to overfit a data set is in order to understand the model capacity needed in order to represent your dataset. If our model capacity is too low, you won't be able to represent your da
15,854
Neural Network: Why can't I overfit?
I had the same problem, i kept zero regularisation and optimal learning rate. but the learning rate decay was set to zero. Once I set the learning rate decay to some value like 0.95 it worked and increase the number of epochs
Neural Network: Why can't I overfit?
I had the same problem, i kept zero regularisation and optimal learning rate. but the learning rate decay was set to zero. Once I set the learning rate decay to some value like 0.95 it worked and incr
Neural Network: Why can't I overfit? I had the same problem, i kept zero regularisation and optimal learning rate. but the learning rate decay was set to zero. Once I set the learning rate decay to some value like 0.95 it worked and increase the number of epochs
Neural Network: Why can't I overfit? I had the same problem, i kept zero regularisation and optimal learning rate. but the learning rate decay was set to zero. Once I set the learning rate decay to some value like 0.95 it worked and incr
15,855
How is the confidence interval calculated for the ACF function?
In Chatfield's Analysis of Time Series (1980), he gives a number of methods of estimating the autocovariance function, including the jack-knife method. He also notes that it can be shown that the variance of the autocorrelation coefficient at lag k, $r_k$, is normally distributed at the limit, and that $\operatorname{V...
How is the confidence interval calculated for the ACF function?
In Chatfield's Analysis of Time Series (1980), he gives a number of methods of estimating the autocovariance function, including the jack-knife method. He also notes that it can be shown that the vari
How is the confidence interval calculated for the ACF function? In Chatfield's Analysis of Time Series (1980), he gives a number of methods of estimating the autocovariance function, including the jack-knife method. He also notes that it can be shown that the variance of the autocorrelation coefficient at lag k, $r_k$,...
How is the confidence interval calculated for the ACF function? In Chatfield's Analysis of Time Series (1980), he gives a number of methods of estimating the autocovariance function, including the jack-knife method. He also notes that it can be shown that the vari
15,856
understanding of p-value in multiple linear regression
This is incorrect for a couple reasons: The model "without" X4 will not necessarily have the same coefficient estimates for the other values. Fit the reduced model and see for yourself. The statistical test for the coefficient does not concern the "mean" values of Y obtained from 2 predictions. The predicted $Y$ will ...
understanding of p-value in multiple linear regression
This is incorrect for a couple reasons: The model "without" X4 will not necessarily have the same coefficient estimates for the other values. Fit the reduced model and see for yourself. The statistic
understanding of p-value in multiple linear regression This is incorrect for a couple reasons: The model "without" X4 will not necessarily have the same coefficient estimates for the other values. Fit the reduced model and see for yourself. The statistical test for the coefficient does not concern the "mean" values of...
understanding of p-value in multiple linear regression This is incorrect for a couple reasons: The model "without" X4 will not necessarily have the same coefficient estimates for the other values. Fit the reduced model and see for yourself. The statistic
15,857
understanding of p-value in multiple linear regression
Your initial interpretation of p-values appears correct, which is that only the intercept has a coefficient that's significantly different from 0. You'll notice that the estimate of the coefficient for x4 is still quite high, but there's enough error that it's not significantly different from 0. Your paired t test of y...
understanding of p-value in multiple linear regression
Your initial interpretation of p-values appears correct, which is that only the intercept has a coefficient that's significantly different from 0. You'll notice that the estimate of the coefficient fo
understanding of p-value in multiple linear regression Your initial interpretation of p-values appears correct, which is that only the intercept has a coefficient that's significantly different from 0. You'll notice that the estimate of the coefficient for x4 is still quite high, but there's enough error that it's not ...
understanding of p-value in multiple linear regression Your initial interpretation of p-values appears correct, which is that only the intercept has a coefficient that's significantly different from 0. You'll notice that the estimate of the coefficient fo
15,858
Bayesian estimation of $N$ of a binomial distribution
Well, since you got your code to work, it looks like this answer is a bit too late. But I've already written the code, so... For what it's worth, this is the same* model fit with rstan. It is estimated in 11 seconds on my consumer laptop, achieving a higher effective sample size for our parameters of interest $(N, \the...
Bayesian estimation of $N$ of a binomial distribution
Well, since you got your code to work, it looks like this answer is a bit too late. But I've already written the code, so... For what it's worth, this is the same* model fit with rstan. It is estimate
Bayesian estimation of $N$ of a binomial distribution Well, since you got your code to work, it looks like this answer is a bit too late. But I've already written the code, so... For what it's worth, this is the same* model fit with rstan. It is estimated in 11 seconds on my consumer laptop, achieving a higher effectiv...
Bayesian estimation of $N$ of a binomial distribution Well, since you got your code to work, it looks like this answer is a bit too late. But I've already written the code, so... For what it's worth, this is the same* model fit with rstan. It is estimate
15,859
Bayesian estimation of $N$ of a binomial distribution
Thanks again to @StéphaneLaurent and @user777 for their valuable input in the comments. After some tweaking of the prior for $\lambda$ I can now replicate the results from the paper of Raftery (1988). Here is my analysis script and results using JAGS and R: #=============================================================...
Bayesian estimation of $N$ of a binomial distribution
Thanks again to @StéphaneLaurent and @user777 for their valuable input in the comments. After some tweaking of the prior for $\lambda$ I can now replicate the results from the paper of Raftery (1988).
Bayesian estimation of $N$ of a binomial distribution Thanks again to @StéphaneLaurent and @user777 for their valuable input in the comments. After some tweaking of the prior for $\lambda$ I can now replicate the results from the paper of Raftery (1988). Here is my analysis script and results using JAGS and R: #=======...
Bayesian estimation of $N$ of a binomial distribution Thanks again to @StéphaneLaurent and @user777 for their valuable input in the comments. After some tweaking of the prior for $\lambda$ I can now replicate the results from the paper of Raftery (1988).
15,860
What do you do when there's no elbow point for kmeans clustering
Wrong method? Maybe you are using the wrong algorithm for your problem. Wrong preprocessing? K-means is highly sensitive to preprocessing. If one attribute is on a much larger scale than the others, it will dominate the output. Your output will then be effectively 1-dimensional Visualize results Whatever you do, you ne...
What do you do when there's no elbow point for kmeans clustering
Wrong method? Maybe you are using the wrong algorithm for your problem. Wrong preprocessing? K-means is highly sensitive to preprocessing. If one attribute is on a much larger scale than the others, i
What do you do when there's no elbow point for kmeans clustering Wrong method? Maybe you are using the wrong algorithm for your problem. Wrong preprocessing? K-means is highly sensitive to preprocessing. If one attribute is on a much larger scale than the others, it will dominate the output. Your output will then be ef...
What do you do when there's no elbow point for kmeans clustering Wrong method? Maybe you are using the wrong algorithm for your problem. Wrong preprocessing? K-means is highly sensitive to preprocessing. If one attribute is on a much larger scale than the others, i
15,861
What do you do when there's no elbow point for kmeans clustering
One way is to manually inspect the members in your clusters for a specific k to see if the groupings make sense (are they distinguishable?). This can be done via contingency tables and conditional means. Do this for a variety of k's and you can determine what value is appropriate. A less subjective way is to use the ...
What do you do when there's no elbow point for kmeans clustering
One way is to manually inspect the members in your clusters for a specific k to see if the groupings make sense (are they distinguishable?). This can be done via contingency tables and conditional me
What do you do when there's no elbow point for kmeans clustering One way is to manually inspect the members in your clusters for a specific k to see if the groupings make sense (are they distinguishable?). This can be done via contingency tables and conditional means. Do this for a variety of k's and you can determin...
What do you do when there's no elbow point for kmeans clustering One way is to manually inspect the members in your clusters for a specific k to see if the groupings make sense (are they distinguishable?). This can be done via contingency tables and conditional me
15,862
What do you do when there's no elbow point for kmeans clustering
No elbow in for K-means does not mean that there are no clusters in the data; No elbow means that the algorithm used cannot separate clusters; (think about K-means for concentric circles, vs DBSCAN) Generally, you may consider: tune your algorithm; use another algorithm; do data preprocessing.
What do you do when there's no elbow point for kmeans clustering
No elbow in for K-means does not mean that there are no clusters in the data; No elbow means that the algorithm used cannot separate clusters; (think about K-means for concentric circles, vs DBSCAN)
What do you do when there's no elbow point for kmeans clustering No elbow in for K-means does not mean that there are no clusters in the data; No elbow means that the algorithm used cannot separate clusters; (think about K-means for concentric circles, vs DBSCAN) Generally, you may consider: tune your algorithm; use ...
What do you do when there's no elbow point for kmeans clustering No elbow in for K-means does not mean that there are no clusters in the data; No elbow means that the algorithm used cannot separate clusters; (think about K-means for concentric circles, vs DBSCAN)
15,863
What do you do when there's no elbow point for kmeans clustering
We can use the NbClust package to find the most optimal value of k. It provides 30 indices for determining the number of clusters and proposes the best result. NbClust(data=df, distance ="euclidean", min.nc=2, max.nc=15, method ="kmeans", index="all")
What do you do when there's no elbow point for kmeans clustering
We can use the NbClust package to find the most optimal value of k. It provides 30 indices for determining the number of clusters and proposes the best result. NbClust(data=df, distance ="euclidean",
What do you do when there's no elbow point for kmeans clustering We can use the NbClust package to find the most optimal value of k. It provides 30 indices for determining the number of clusters and proposes the best result. NbClust(data=df, distance ="euclidean", min.nc=2, max.nc=15, method ="kmeans", index="all")
What do you do when there's no elbow point for kmeans clustering We can use the NbClust package to find the most optimal value of k. It provides 30 indices for determining the number of clusters and proposes the best result. NbClust(data=df, distance ="euclidean",
15,864
Is there a style guide for statistical graphs intended for presentations?
On color Generally, use dark background in a dark room; light background in a well-lit room or room with plenty of natural light. Once you’ve picked dark background, then use light color for fonts and graphical components; vice versa for light background. I found it useful to actually project a color wheel onto the scr...
Is there a style guide for statistical graphs intended for presentations?
On color Generally, use dark background in a dark room; light background in a well-lit room or room with plenty of natural light. Once you’ve picked dark background, then use light color for fonts and
Is there a style guide for statistical graphs intended for presentations? On color Generally, use dark background in a dark room; light background in a well-lit room or room with plenty of natural light. Once you’ve picked dark background, then use light color for fonts and graphical components; vice versa for light ba...
Is there a style guide for statistical graphs intended for presentations? On color Generally, use dark background in a dark room; light background in a well-lit room or room with plenty of natural light. Once you’ve picked dark background, then use light color for fonts and
15,865
Is there a style guide for statistical graphs intended for presentations?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. A couple more guides Sunlight labs - http://design.sun...
Is there a style guide for statistical graphs intended for presentations?
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Is there a style guide for statistical graphs intended for presentations? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. ...
Is there a style guide for statistical graphs intended for presentations? Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
15,866
Expected value of the log-determinant of a Wishart matrix
As I was getting ready to post this, I was able to answer my own question. In accordance with general StackExchange etiquette I've decided to post it anyways in hopes that someone else who runs into this problem might find this in the future, possibly after running into the same issues with sources that I did. I've dec...
Expected value of the log-determinant of a Wishart matrix
As I was getting ready to post this, I was able to answer my own question. In accordance with general StackExchange etiquette I've decided to post it anyways in hopes that someone else who runs into t
Expected value of the log-determinant of a Wishart matrix As I was getting ready to post this, I was able to answer my own question. In accordance with general StackExchange etiquette I've decided to post it anyways in hopes that someone else who runs into this problem might find this in the future, possibly after runn...
Expected value of the log-determinant of a Wishart matrix As I was getting ready to post this, I was able to answer my own question. In accordance with general StackExchange etiquette I've decided to post it anyways in hopes that someone else who runs into t
15,867
How to detect a significant change in time series data due to a "policy" change?
The Box-Tiao paper referred to by Jason was based on a known law change. The question here is how to detect the point in time. The answer is to use the Tsay procedure to detect Interventions be they Pulses, level Shifts , Seasonal Pulses and/or local time trends.
How to detect a significant change in time series data due to a "policy" change?
The Box-Tiao paper referred to by Jason was based on a known law change. The question here is how to detect the point in time. The answer is to use the Tsay procedure to detect Interventions be they
How to detect a significant change in time series data due to a "policy" change? The Box-Tiao paper referred to by Jason was based on a known law change. The question here is how to detect the point in time. The answer is to use the Tsay procedure to detect Interventions be they Pulses, level Shifts , Seasonal Pulses ...
How to detect a significant change in time series data due to a "policy" change? The Box-Tiao paper referred to by Jason was based on a known law change. The question here is how to detect the point in time. The answer is to use the Tsay procedure to detect Interventions be they
15,868
How to detect a significant change in time series data due to a "policy" change?
Josh said: josh: From the OP "What is the appropriate test to determine if the time series has increase or decreased based on the data? ". This I believe asks for a determination if the mean of the residuals has shifted not the parameters of some ARIMA Model. In my opinion you are recommending the wrong softw...
How to detect a significant change in time series data due to a "policy" change?
Josh said: josh: From the OP "What is the appropriate test to determine if the time series has increase or decreased based on the data? ". This I believe asks for a determination if the mean of
How to detect a significant change in time series data due to a "policy" change? Josh said: josh: From the OP "What is the appropriate test to determine if the time series has increase or decreased based on the data? ". This I believe asks for a determination if the mean of the residuals has shifted not the par...
How to detect a significant change in time series data due to a "policy" change? Josh said: josh: From the OP "What is the appropriate test to determine if the time series has increase or decreased based on the data? ". This I believe asks for a determination if the mean of
15,869
How to detect a significant change in time series data due to a "policy" change?
Looking through some old notes on structural breaks, I have these two cites: Enders, "Applied Econometric Time Series", 2nd edition, ch. 5. Enders discusses interventions, pulse functions, gradual change functions, transfer functions, etc. This article may also be helpful: Box, G.E.P. and G. C. Tiao. 1975. “Interven...
How to detect a significant change in time series data due to a "policy" change?
Looking through some old notes on structural breaks, I have these two cites: Enders, "Applied Econometric Time Series", 2nd edition, ch. 5. Enders discusses interventions, pulse functions, gradual c
How to detect a significant change in time series data due to a "policy" change? Looking through some old notes on structural breaks, I have these two cites: Enders, "Applied Econometric Time Series", 2nd edition, ch. 5. Enders discusses interventions, pulse functions, gradual change functions, transfer functions, et...
How to detect a significant change in time series data due to a "policy" change? Looking through some old notes on structural breaks, I have these two cites: Enders, "Applied Econometric Time Series", 2nd edition, ch. 5. Enders discusses interventions, pulse functions, gradual c
15,870
How to detect a significant change in time series data due to a "policy" change?
Couldn't you just use a change point model, and then try to identify the change point using an MCMC algorithm such as Gibbs Sampling? This should be relatively simple to implement, provided you have some prior distributions for your data or the full conditional distirbution (for Gibbs). You can find a quick overview h...
How to detect a significant change in time series data due to a "policy" change?
Couldn't you just use a change point model, and then try to identify the change point using an MCMC algorithm such as Gibbs Sampling? This should be relatively simple to implement, provided you have
How to detect a significant change in time series data due to a "policy" change? Couldn't you just use a change point model, and then try to identify the change point using an MCMC algorithm such as Gibbs Sampling? This should be relatively simple to implement, provided you have some prior distributions for your data ...
How to detect a significant change in time series data due to a "policy" change? Couldn't you just use a change point model, and then try to identify the change point using an MCMC algorithm such as Gibbs Sampling? This should be relatively simple to implement, provided you have
15,871
How to detect a significant change in time series data due to a "policy" change?
If you were considering all time points as candidate change points (a.k.a. break points, a.k.a. structural change) then the strucchange package is a very good option. It seem that in your particular scenario, there is only one candidate time point. In this case, several quick options come to mind: T-test: a t-test on ...
How to detect a significant change in time series data due to a "policy" change?
If you were considering all time points as candidate change points (a.k.a. break points, a.k.a. structural change) then the strucchange package is a very good option. It seem that in your particular s
How to detect a significant change in time series data due to a "policy" change? If you were considering all time points as candidate change points (a.k.a. break points, a.k.a. structural change) then the strucchange package is a very good option. It seem that in your particular scenario, there is only one candidate ti...
How to detect a significant change in time series data due to a "policy" change? If you were considering all time points as candidate change points (a.k.a. break points, a.k.a. structural change) then the strucchange package is a very good option. It seem that in your particular s
15,872
How to detect a significant change in time series data due to a "policy" change?
A few years ago I heard a talk by a grad student, Stacey Hancock, during a local ASA chapter meeting and it was on "structural break estimation" of time series. The talk was really interesting and I spoke with her afterwards and she was working with Richard Davis (of Brockwell-Davis), then at Colorado State University,...
How to detect a significant change in time series data due to a "policy" change?
A few years ago I heard a talk by a grad student, Stacey Hancock, during a local ASA chapter meeting and it was on "structural break estimation" of time series. The talk was really interesting and I s
How to detect a significant change in time series data due to a "policy" change? A few years ago I heard a talk by a grad student, Stacey Hancock, during a local ASA chapter meeting and it was on "structural break estimation" of time series. The talk was really interesting and I spoke with her afterwards and she was wo...
How to detect a significant change in time series data due to a "policy" change? A few years ago I heard a talk by a grad student, Stacey Hancock, during a local ASA chapter meeting and it was on "structural break estimation" of time series. The talk was really interesting and I s
15,873
What is ordinary, in ordinary least squares?
Least squares in $y$ is often called ordinary least squares (OLS) because it was the first ever statistical procedure to be developed circa 1800, see history. It is equivalent to minimizing the $L_2$ norm, $||Y-f(X)||_2$. Subsequently, weighted least squares, minimization of other norms (e.g., $L_1$), generalized least...
What is ordinary, in ordinary least squares?
Least squares in $y$ is often called ordinary least squares (OLS) because it was the first ever statistical procedure to be developed circa 1800, see history. It is equivalent to minimizing the $L_2$
What is ordinary, in ordinary least squares? Least squares in $y$ is often called ordinary least squares (OLS) because it was the first ever statistical procedure to be developed circa 1800, see history. It is equivalent to minimizing the $L_2$ norm, $||Y-f(X)||_2$. Subsequently, weighted least squares, minimization of...
What is ordinary, in ordinary least squares? Least squares in $y$ is often called ordinary least squares (OLS) because it was the first ever statistical procedure to be developed circa 1800, see history. It is equivalent to minimizing the $L_2$
15,874
What is the relation behind Jeffreys Priors and a variance stabilizing transformation?
The Jeffreys prior is invariant under reparametrization. For that reason, many Bayesians consider it to be a “non-informative prior”. (Hartigan showed that there is a whole space of such priors $J^\alpha H^\beta$ for $\alpha + \beta=1$ where $J$ is Jeffreys' prior and $H$ is Hartigan's asymptotically locally invarian...
What is the relation behind Jeffreys Priors and a variance stabilizing transformation?
The Jeffreys prior is invariant under reparametrization. For that reason, many Bayesians consider it to be a “non-informative prior”. (Hartigan showed that there is a whole space of such priors $J^\
What is the relation behind Jeffreys Priors and a variance stabilizing transformation? The Jeffreys prior is invariant under reparametrization. For that reason, many Bayesians consider it to be a “non-informative prior”. (Hartigan showed that there is a whole space of such priors $J^\alpha H^\beta$ for $\alpha + \bet...
What is the relation behind Jeffreys Priors and a variance stabilizing transformation? The Jeffreys prior is invariant under reparametrization. For that reason, many Bayesians consider it to be a “non-informative prior”. (Hartigan showed that there is a whole space of such priors $J^\
15,875
What is the relation behind Jeffreys Priors and a variance stabilizing transformation?
The Wikipedia page that you provided does not really use the term "variance-stabilizing transformation". The term "variance-stabilizing transformation" is generally used to indicate transformations that make the variance of the random variable a constant. Although in the Bernoulli case, this is what is happening with t...
What is the relation behind Jeffreys Priors and a variance stabilizing transformation?
The Wikipedia page that you provided does not really use the term "variance-stabilizing transformation". The term "variance-stabilizing transformation" is generally used to indicate transformations th
What is the relation behind Jeffreys Priors and a variance stabilizing transformation? The Wikipedia page that you provided does not really use the term "variance-stabilizing transformation". The term "variance-stabilizing transformation" is generally used to indicate transformations that make the variance of the rando...
What is the relation behind Jeffreys Priors and a variance stabilizing transformation? The Wikipedia page that you provided does not really use the term "variance-stabilizing transformation". The term "variance-stabilizing transformation" is generally used to indicate transformations th
15,876
Does using count data as independent variable violate any of GLM assumptions?
There are some nuances at play here, and they may be creating some confusion. You state that you understand the assumptions of a logistic regression include "iid residuals... ". I would argue that this is not quite correct. We generally do say that about the General Linear Model (i.e., regression), but in that case...
Does using count data as independent variable violate any of GLM assumptions?
There are some nuances at play here, and they may be creating some confusion. You state that you understand the assumptions of a logistic regression include "iid residuals... ". I would argue that
Does using count data as independent variable violate any of GLM assumptions? There are some nuances at play here, and they may be creating some confusion. You state that you understand the assumptions of a logistic regression include "iid residuals... ". I would argue that this is not quite correct. We generally d...
Does using count data as independent variable violate any of GLM assumptions? There are some nuances at play here, and they may be creating some confusion. You state that you understand the assumptions of a logistic regression include "iid residuals... ". I would argue that
15,877
Does using count data as independent variable violate any of GLM assumptions?
One thing I would definitely check is the distributional properties of your independent variables. Very often with count data, you'll see some moderate to severe right-skew. In that case, you will likely want to transform your data, as you'll lose the log-linear relationship. But no, using a logistic (or other GLM) mod...
Does using count data as independent variable violate any of GLM assumptions?
One thing I would definitely check is the distributional properties of your independent variables. Very often with count data, you'll see some moderate to severe right-skew. In that case, you will lik
Does using count data as independent variable violate any of GLM assumptions? One thing I would definitely check is the distributional properties of your independent variables. Very often with count data, you'll see some moderate to severe right-skew. In that case, you will likely want to transform your data, as you'll...
Does using count data as independent variable violate any of GLM assumptions? One thing I would definitely check is the distributional properties of your independent variables. Very often with count data, you'll see some moderate to severe right-skew. In that case, you will lik
15,878
Does GBM classification suffer from imbalanced class sizes?
In my experience, GBM does indeed suffer from imbalanced class sizes. I have had good success using SMOTE sampling, which creates synthetic data while oversampling the minority class. You can find it in the DMwR package.
Does GBM classification suffer from imbalanced class sizes?
In my experience, GBM does indeed suffer from imbalanced class sizes. I have had good success using SMOTE sampling, which creates synthetic data while oversampling the minority class. You can find it
Does GBM classification suffer from imbalanced class sizes? In my experience, GBM does indeed suffer from imbalanced class sizes. I have had good success using SMOTE sampling, which creates synthetic data while oversampling the minority class. You can find it in the DMwR package.
Does GBM classification suffer from imbalanced class sizes? In my experience, GBM does indeed suffer from imbalanced class sizes. I have had good success using SMOTE sampling, which creates synthetic data while oversampling the minority class. You can find it
15,879
Does GBM classification suffer from imbalanced class sizes?
I think your data is similar to Secom data on which I have worked in past and faced lot of difficulties. Following is what I have tried: Different sampling techniques Different classifiers like Random Forest, ANN, GBM, Ensemble methods, etc. I've also tried 1-Class SVM which has given better results as compared to o...
Does GBM classification suffer from imbalanced class sizes?
I think your data is similar to Secom data on which I have worked in past and faced lot of difficulties. Following is what I have tried: Different sampling techniques Different classifiers like Rand
Does GBM classification suffer from imbalanced class sizes? I think your data is similar to Secom data on which I have worked in past and faced lot of difficulties. Following is what I have tried: Different sampling techniques Different classifiers like Random Forest, ANN, GBM, Ensemble methods, etc. I've also tried...
Does GBM classification suffer from imbalanced class sizes? I think your data is similar to Secom data on which I have worked in past and faced lot of difficulties. Following is what I have tried: Different sampling techniques Different classifiers like Rand
15,880
Why does shrinkage really work, what's so special about 0?
1) Why the damage done by introducing bias is less compared with the gain in variance? It doesn't have to, it just usually is. Whether the tradeoff is worth it depends on the loss function. But the things we care about in real life are often similar to the squared error (e.g. we care more about one big error than abou...
Why does shrinkage really work, what's so special about 0?
1) Why the damage done by introducing bias is less compared with the gain in variance? It doesn't have to, it just usually is. Whether the tradeoff is worth it depends on the loss function. But the t
Why does shrinkage really work, what's so special about 0? 1) Why the damage done by introducing bias is less compared with the gain in variance? It doesn't have to, it just usually is. Whether the tradeoff is worth it depends on the loss function. But the things we care about in real life are often similar to the squ...
Why does shrinkage really work, what's so special about 0? 1) Why the damage done by introducing bias is less compared with the gain in variance? It doesn't have to, it just usually is. Whether the tradeoff is worth it depends on the loss function. But the t
15,881
Why does shrinkage really work, what's so special about 0?
Ridge, lasso and elastic net are similar to Bayesian methods with priors centered on zero -- see, for example, Statistical Learning with Sparsity by Hastie, Tibshirani and Wainwright, section 2.9 Lq Penalties and Bayes Estimates: "There is also a Bayesian view of these estimators. ... This means that the lasso estimat...
Why does shrinkage really work, what's so special about 0?
Ridge, lasso and elastic net are similar to Bayesian methods with priors centered on zero -- see, for example, Statistical Learning with Sparsity by Hastie, Tibshirani and Wainwright, section 2.9 Lq
Why does shrinkage really work, what's so special about 0? Ridge, lasso and elastic net are similar to Bayesian methods with priors centered on zero -- see, for example, Statistical Learning with Sparsity by Hastie, Tibshirani and Wainwright, section 2.9 Lq Penalties and Bayes Estimates: "There is also a Bayesian view...
Why does shrinkage really work, what's so special about 0? Ridge, lasso and elastic net are similar to Bayesian methods with priors centered on zero -- see, for example, Statistical Learning with Sparsity by Hastie, Tibshirani and Wainwright, section 2.9 Lq
15,882
When was the word "bias" coined to mean $\mathbb{E}[\hat{\theta}-\theta]$?
Apparently, the concept of mean bias was coined by: Neyman, J., & Pearson, E. S. (1936). Contributions to the theory of testing statistical hypotheses. Statistical Research Memoirs, 1, 1-37. acccording to: Lehmann, E. L. "A General Concept of Unbiasedness" The Annals of Mathematical Statistics, vol. 22, no. 4 (Dec.,...
When was the word "bias" coined to mean $\mathbb{E}[\hat{\theta}-\theta]$?
Apparently, the concept of mean bias was coined by: Neyman, J., & Pearson, E. S. (1936). Contributions to the theory of testing statistical hypotheses. Statistical Research Memoirs, 1, 1-37. acccord
When was the word "bias" coined to mean $\mathbb{E}[\hat{\theta}-\theta]$? Apparently, the concept of mean bias was coined by: Neyman, J., & Pearson, E. S. (1936). Contributions to the theory of testing statistical hypotheses. Statistical Research Memoirs, 1, 1-37. acccording to: Lehmann, E. L. "A General Concept of...
When was the word "bias" coined to mean $\mathbb{E}[\hat{\theta}-\theta]$? Apparently, the concept of mean bias was coined by: Neyman, J., & Pearson, E. S. (1936). Contributions to the theory of testing statistical hypotheses. Statistical Research Memoirs, 1, 1-37. acccord
15,883
Hyperparameter tuning in Gaussian Process Regression
You are right that you need a new covariance matrix computation on every iteration of gradient ascent. So if the matrix computation is not feasible for your setting, then, I think, you cannot use gradient-based marginal likelihood optimization. My suggestion is to use gradient-free methods for hyperparameter tuning, su...
Hyperparameter tuning in Gaussian Process Regression
You are right that you need a new covariance matrix computation on every iteration of gradient ascent. So if the matrix computation is not feasible for your setting, then, I think, you cannot use grad
Hyperparameter tuning in Gaussian Process Regression You are right that you need a new covariance matrix computation on every iteration of gradient ascent. So if the matrix computation is not feasible for your setting, then, I think, you cannot use gradient-based marginal likelihood optimization. My suggestion is to us...
Hyperparameter tuning in Gaussian Process Regression You are right that you need a new covariance matrix computation on every iteration of gradient ascent. So if the matrix computation is not feasible for your setting, then, I think, you cannot use grad
15,884
Hyperparameter tuning in Gaussian Process Regression
If solving the linear problem $K\pmb{\alpha} = \textbf{y}$ is too expensive for you at each step of your optimisation, you could resort to approximation techniques such as the Nystr$\ddot{o}$m method (e.g., Williams and Seeger 2001), such that if $K \in \mathbb{R}^{n \times n}$, the Nystr$\ddot{o}$m method computes a r...
Hyperparameter tuning in Gaussian Process Regression
If solving the linear problem $K\pmb{\alpha} = \textbf{y}$ is too expensive for you at each step of your optimisation, you could resort to approximation techniques such as the Nystr$\ddot{o}$m method
Hyperparameter tuning in Gaussian Process Regression If solving the linear problem $K\pmb{\alpha} = \textbf{y}$ is too expensive for you at each step of your optimisation, you could resort to approximation techniques such as the Nystr$\ddot{o}$m method (e.g., Williams and Seeger 2001), such that if $K \in \mathbb{R}^{n...
Hyperparameter tuning in Gaussian Process Regression If solving the linear problem $K\pmb{\alpha} = \textbf{y}$ is too expensive for you at each step of your optimisation, you could resort to approximation techniques such as the Nystr$\ddot{o}$m method
15,885
How to correctly assess the correlation between ordinal and a continuous variable?
You could use Spearman's, which is based on ranks and therefore OK for ordinal data. You would then have six results. If you want to take a different approach, you could get complex and look at a multilevel model, with subject being repeated. It sounds like "accuracy" would depend on "preference". So, a mixed model cou...
How to correctly assess the correlation between ordinal and a continuous variable?
You could use Spearman's, which is based on ranks and therefore OK for ordinal data. You would then have six results. If you want to take a different approach, you could get complex and look at a mult
How to correctly assess the correlation between ordinal and a continuous variable? You could use Spearman's, which is based on ranks and therefore OK for ordinal data. You would then have six results. If you want to take a different approach, you could get complex and look at a multilevel model, with subject being repe...
How to correctly assess the correlation between ordinal and a continuous variable? You could use Spearman's, which is based on ranks and therefore OK for ordinal data. You would then have six results. If you want to take a different approach, you could get complex and look at a mult
15,886
How to correctly assess the correlation between ordinal and a continuous variable?
According to this paper* "Measures of Association: How to Choose?" (doi:10.1177/8756479308317006), you should consider kendall's tau-b if the number of items in your ordinal variable is low (<5 or <6 ... this is a bit arbitrary). If you have a large number of items in your ordinal variable, Spearman correlation would w...
How to correctly assess the correlation between ordinal and a continuous variable?
According to this paper* "Measures of Association: How to Choose?" (doi:10.1177/8756479308317006), you should consider kendall's tau-b if the number of items in your ordinal variable is low (<5 or <6
How to correctly assess the correlation between ordinal and a continuous variable? According to this paper* "Measures of Association: How to Choose?" (doi:10.1177/8756479308317006), you should consider kendall's tau-b if the number of items in your ordinal variable is low (<5 or <6 ... this is a bit arbitrary). If you ...
How to correctly assess the correlation between ordinal and a continuous variable? According to this paper* "Measures of Association: How to Choose?" (doi:10.1177/8756479308317006), you should consider kendall's tau-b if the number of items in your ordinal variable is low (<5 or <6
15,887
How to: Prediction intervals for linear regression via bootstrapping
Confidence intervals take account of the estimation uncertainty. Prediction intervals add to this the fundamental uncertainty. R's predict.lm will give you the prediction interval for a linear model. From there, all you have to do is run it repeatedly on bootstrapped samples. n <- 100 n.bs <- 30 dat <- data.frame( ...
How to: Prediction intervals for linear regression via bootstrapping
Confidence intervals take account of the estimation uncertainty. Prediction intervals add to this the fundamental uncertainty. R's predict.lm will give you the prediction interval for a linear model
How to: Prediction intervals for linear regression via bootstrapping Confidence intervals take account of the estimation uncertainty. Prediction intervals add to this the fundamental uncertainty. R's predict.lm will give you the prediction interval for a linear model. From there, all you have to do is run it repeate...
How to: Prediction intervals for linear regression via bootstrapping Confidence intervals take account of the estimation uncertainty. Prediction intervals add to this the fundamental uncertainty. R's predict.lm will give you the prediction interval for a linear model
15,888
How to: Prediction intervals for linear regression via bootstrapping
Bootstrapping does not assumed any knowledge of the form of the underlying parent distribution from which the sample arose. Traditional classical statistical parameter estimates are based on the normality assumption. Bootstrap deals with non-normality and is more accurate in practice than the classical methods. Bootstr...
How to: Prediction intervals for linear regression via bootstrapping
Bootstrapping does not assumed any knowledge of the form of the underlying parent distribution from which the sample arose. Traditional classical statistical parameter estimates are based on the norma
How to: Prediction intervals for linear regression via bootstrapping Bootstrapping does not assumed any knowledge of the form of the underlying parent distribution from which the sample arose. Traditional classical statistical parameter estimates are based on the normality assumption. Bootstrap deals with non-normality...
How to: Prediction intervals for linear regression via bootstrapping Bootstrapping does not assumed any knowledge of the form of the underlying parent distribution from which the sample arose. Traditional classical statistical parameter estimates are based on the norma
15,889
When will a Kalman filter give better results than a simple moving average?
The estimate given by a moving average will lag behind the true state. Say you want to measure the altitude of a plane rising at a constant velocity and you have noisy (Gaussian) altitude measurements. An average over a time interval of noisy altitude measurements is likely to give you a good estimate of where the plan...
When will a Kalman filter give better results than a simple moving average?
The estimate given by a moving average will lag behind the true state. Say you want to measure the altitude of a plane rising at a constant velocity and you have noisy (Gaussian) altitude measurements
When will a Kalman filter give better results than a simple moving average? The estimate given by a moving average will lag behind the true state. Say you want to measure the altitude of a plane rising at a constant velocity and you have noisy (Gaussian) altitude measurements. An average over a time interval of noisy a...
When will a Kalman filter give better results than a simple moving average? The estimate given by a moving average will lag behind the true state. Say you want to measure the altitude of a plane rising at a constant velocity and you have noisy (Gaussian) altitude measurements
15,890
When will a Kalman filter give better results than a simple moving average?
I found that using the original parameters that I used to setup the problem, the moving average was performing better, but when I started playing with the parameters that defined my dynamic model I found the Kalman Filter was performing much better. Now that I have something setup to see the effects the parameters pla...
When will a Kalman filter give better results than a simple moving average?
I found that using the original parameters that I used to setup the problem, the moving average was performing better, but when I started playing with the parameters that defined my dynamic model I fo
When will a Kalman filter give better results than a simple moving average? I found that using the original parameters that I used to setup the problem, the moving average was performing better, but when I started playing with the parameters that defined my dynamic model I found the Kalman Filter was performing much be...
When will a Kalman filter give better results than a simple moving average? I found that using the original parameters that I used to setup the problem, the moving average was performing better, but when I started playing with the parameters that defined my dynamic model I fo
15,891
What are some distributions over the probability simplex?
This is studied in compositional data analysis, there is a book by Aitchison: The Statistical Analysis Of Compositional Data. Define the simplex by $$ S^n =\{(x_1, \dots,x_{n+1}) \in {\mathbb R}^{n+1} \colon x_1>0,\dots, x_{n+1}>0, \sum_{i=1}^{n+1} x_i=1\}. $$ Note that we use the index $n$ to indicate dimensio...
What are some distributions over the probability simplex?
This is studied in compositional data analysis, there is a book by Aitchison: The Statistical Analysis Of Compositional Data. Define the simplex by $$ S^n =\{(x_1, \dots,x_{n+1}) \in {\mathbb
What are some distributions over the probability simplex? This is studied in compositional data analysis, there is a book by Aitchison: The Statistical Analysis Of Compositional Data. Define the simplex by $$ S^n =\{(x_1, \dots,x_{n+1}) \in {\mathbb R}^{n+1} \colon x_1>0,\dots, x_{n+1}>0, \sum_{i=1}^{n+1} x_i=1...
What are some distributions over the probability simplex? This is studied in compositional data analysis, there is a book by Aitchison: The Statistical Analysis Of Compositional Data. Define the simplex by $$ S^n =\{(x_1, \dots,x_{n+1}) \in {\mathbb
15,892
Random walk with momentum
To jump to the conclusion immediately, the "momentum" does not change the fact that the normal distribution is an asymptotic approximation of the distribution of the random walk, but the variance changes from $4np(1-p)$ to $np/(1-p)$. This can be derived by relatively elementary considerations in this special case. It ...
Random walk with momentum
To jump to the conclusion immediately, the "momentum" does not change the fact that the normal distribution is an asymptotic approximation of the distribution of the random walk, but the variance chan
Random walk with momentum To jump to the conclusion immediately, the "momentum" does not change the fact that the normal distribution is an asymptotic approximation of the distribution of the random walk, but the variance changes from $4np(1-p)$ to $np/(1-p)$. This can be derived by relatively elementary considerations...
Random walk with momentum To jump to the conclusion immediately, the "momentum" does not change the fact that the normal distribution is an asymptotic approximation of the distribution of the random walk, but the variance chan
15,893
Random walk with momentum
Van Belle's 'Rule of Thumb' 8.7 (from the second edition of his book) includes an approximation for the standard error of the mean when innovations have autocorrelation $\rho$. Translating this using $\rho = 2p - 1$ gives $$\mbox{True standard error of }\bar{x} \approx \sqrt{\frac{p}{1-p}}\frac{s}{\sqrt{n}},$$ where $n...
Random walk with momentum
Van Belle's 'Rule of Thumb' 8.7 (from the second edition of his book) includes an approximation for the standard error of the mean when innovations have autocorrelation $\rho$. Translating this using
Random walk with momentum Van Belle's 'Rule of Thumb' 8.7 (from the second edition of his book) includes an approximation for the standard error of the mean when innovations have autocorrelation $\rho$. Translating this using $\rho = 2p - 1$ gives $$\mbox{True standard error of }\bar{x} \approx \sqrt{\frac{p}{1-p}}\fra...
Random walk with momentum Van Belle's 'Rule of Thumb' 8.7 (from the second edition of his book) includes an approximation for the standard error of the mean when innovations have autocorrelation $\rho$. Translating this using
15,894
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
If you don't like those options, have you considered using a boosting method instead? Given an appropriate loss function, boosting automatically recalibrates the weights as it goes along. If the stochastic nature of random forests appeals to you, stochastic gradient boosting builds that in as well.
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
If you don't like those options, have you considered using a boosting method instead? Given an appropriate loss function, boosting automatically recalibrates the weights as it goes along. If the stoch
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? If you don't like those options, have you considered using a boosting method instead? Given an appropriate loss function, boosting automatically recalibrates the weights as it goes along. If the stochastic nature of random fo...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? If you don't like those options, have you considered using a boosting method instead? Given an appropriate loss function, boosting automatically recalibrates the weights as it goes along. If the stoch
15,895
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
I think that weighting objects is somehow equivalent to duplicating them. Maybe you should try modifying the bootstrap step by sampling appropriately your different classes. Another thought is that class imbalance may shift your decision threshold to another value than $0.5$ (if it's a binary classification problem). T...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
I think that weighting objects is somehow equivalent to duplicating them. Maybe you should try modifying the bootstrap step by sampling appropriately your different classes. Another thought is that cl
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? I think that weighting objects is somehow equivalent to duplicating them. Maybe you should try modifying the bootstrap step by sampling appropriately your different classes. Another thought is that class imbalance may shift y...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? I think that weighting objects is somehow equivalent to duplicating them. Maybe you should try modifying the bootstrap step by sampling appropriately your different classes. Another thought is that cl
15,896
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
The synthetic minority over-sampling (SMOTE) generates new observations of the minority class as random convex combinations of neighboring observations. The paper is here: https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-106
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
The synthetic minority over-sampling (SMOTE) generates new observations of the minority class as random convex combinations of neighboring observations. The paper is here: https://bmcbioinformatics.bi
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? The synthetic minority over-sampling (SMOTE) generates new observations of the minority class as random convex combinations of neighboring observations. The paper is here: https://bmcbioinformatics.biomedcentral.com/articles/...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? The synthetic minority over-sampling (SMOTE) generates new observations of the minority class as random convex combinations of neighboring observations. The paper is here: https://bmcbioinformatics.bi
15,897
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
Instead of sampling large classes you can expand small classes ! If large classes have many times more observation then small, then biase will be small. I do hope you can handle that supersized dataset. You may also identify subsets of observations which handle the most information about large classes, there are many ...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
Instead of sampling large classes you can expand small classes ! If large classes have many times more observation then small, then biase will be small. I do hope you can handle that supersized datase
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? Instead of sampling large classes you can expand small classes ! If large classes have many times more observation then small, then biase will be small. I do hope you can handle that supersized dataset. You may also identify...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? Instead of sampling large classes you can expand small classes ! If large classes have many times more observation then small, then biase will be small. I do hope you can handle that supersized datase
15,898
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
(1) You're right the weighting function doesn't work and not sure if it has ever been fixed. (2) Most use option 2 with balanced data. The key to not loosing too much data is stratified sampling. You randomly sample a unique balanced set for each tree.
For classification with Random Forests in R, how should one adjust for imbalanced class sizes?
(1) You're right the weighting function doesn't work and not sure if it has ever been fixed. (2) Most use option 2 with balanced data. The key to not loosing too much data is stratified sampling. You
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? (1) You're right the weighting function doesn't work and not sure if it has ever been fixed. (2) Most use option 2 with balanced data. The key to not loosing too much data is stratified sampling. You randomly sample a unique ...
For classification with Random Forests in R, how should one adjust for imbalanced class sizes? (1) You're right the weighting function doesn't work and not sure if it has ever been fixed. (2) Most use option 2 with balanced data. The key to not loosing too much data is stratified sampling. You
15,899
Why a sufficient statistic contains all the information needed to compute any estimate of the parameter?
Following the comments of @whuber and @Kamster, I probably got a better understanding. When we say that a sufficient statistic contains all the information needed to compute any estimate of the parameter, what we actually mean is that it is enough to compute the maximum likelihood estimator (which is a function of all ...
Why a sufficient statistic contains all the information needed to compute any estimate of the parame
Following the comments of @whuber and @Kamster, I probably got a better understanding. When we say that a sufficient statistic contains all the information needed to compute any estimate of the parame
Why a sufficient statistic contains all the information needed to compute any estimate of the parameter? Following the comments of @whuber and @Kamster, I probably got a better understanding. When we say that a sufficient statistic contains all the information needed to compute any estimate of the parameter, what we ac...
Why a sufficient statistic contains all the information needed to compute any estimate of the parame Following the comments of @whuber and @Kamster, I probably got a better understanding. When we say that a sufficient statistic contains all the information needed to compute any estimate of the parame
15,900
Why a sufficient statistic contains all the information needed to compute any estimate of the parameter?
As I was studying about sufficiency I came across your question because I also wanted to understand the intuition about From what I've gathered this is what I come up with (let me know what you think, if I made any mistakes, etc). Let $X_1,\ldots,X_n$ be a random sample from a Poisson distribution with mean $\theta>0$....
Why a sufficient statistic contains all the information needed to compute any estimate of the parame
As I was studying about sufficiency I came across your question because I also wanted to understand the intuition about From what I've gathered this is what I come up with (let me know what you think,
Why a sufficient statistic contains all the information needed to compute any estimate of the parameter? As I was studying about sufficiency I came across your question because I also wanted to understand the intuition about From what I've gathered this is what I come up with (let me know what you think, if I made any ...
Why a sufficient statistic contains all the information needed to compute any estimate of the parame As I was studying about sufficiency I came across your question because I also wanted to understand the intuition about From what I've gathered this is what I come up with (let me know what you think,