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
12,701
Does it make sense to use a date variable in a regression?
Building on earlier comments on Stack Overflow: Yes, it makes sense. Here I address the general question and am happy to let R experts fill in the crucial details. In my view, as this is now on Cross-Validated, we should not focus too narrowly on the poster's favourite software, important though that is for like-minde...
Does it make sense to use a date variable in a regression?
Building on earlier comments on Stack Overflow: Yes, it makes sense. Here I address the general question and am happy to let R experts fill in the crucial details. In my view, as this is now on Cross
Does it make sense to use a date variable in a regression? Building on earlier comments on Stack Overflow: Yes, it makes sense. Here I address the general question and am happy to let R experts fill in the crucial details. In my view, as this is now on Cross-Validated, we should not focus too narrowly on the poster's ...
Does it make sense to use a date variable in a regression? Building on earlier comments on Stack Overflow: Yes, it makes sense. Here I address the general question and am happy to let R experts fill in the crucial details. In my view, as this is now on Cross
12,702
Does it make sense to use a date variable in a regression?
As been said above, with suitable scaling, dates are great regressors. Time effects are less likely to be linear than even the typical covariates, so I almost always use regression splines in time. Some complex time trends require many knots (e.g., 7 or more) to fit. Restricted cubic splines (natural splines) provid...
Does it make sense to use a date variable in a regression?
As been said above, with suitable scaling, dates are great regressors. Time effects are less likely to be linear than even the typical covariates, so I almost always use regression splines in time.
Does it make sense to use a date variable in a regression? As been said above, with suitable scaling, dates are great regressors. Time effects are less likely to be linear than even the typical covariates, so I almost always use regression splines in time. Some complex time trends require many knots (e.g., 7 or more)...
Does it make sense to use a date variable in a regression? As been said above, with suitable scaling, dates are great regressors. Time effects are less likely to be linear than even the typical covariates, so I almost always use regression splines in time.
12,703
Sources for learning (not just running) statistics/math through R
I think R (or perhaps a comparable programming language) can be extremely helpful in learning about statistics. Of course, this will require that students learn some programming as well, which may be a bridge too far, so depending on your audience, you may need to do all the programming yourself and just show students ...
Sources for learning (not just running) statistics/math through R
I think R (or perhaps a comparable programming language) can be extremely helpful in learning about statistics. Of course, this will require that students learn some programming as well, which may be
Sources for learning (not just running) statistics/math through R I think R (or perhaps a comparable programming language) can be extremely helpful in learning about statistics. Of course, this will require that students learn some programming as well, which may be a bridge too far, so depending on your audience, you m...
Sources for learning (not just running) statistics/math through R I think R (or perhaps a comparable programming language) can be extremely helpful in learning about statistics. Of course, this will require that students learn some programming as well, which may be
12,704
Sources for learning (not just running) statistics/math through R
There is "Introduction to Probability and Statistics Using R" by G. Jay Kerns available at http://ipsur.org/ and as the R package IPSUR. From the title alone, it seems like the type of text you are looking for.
Sources for learning (not just running) statistics/math through R
There is "Introduction to Probability and Statistics Using R" by G. Jay Kerns available at http://ipsur.org/ and as the R package IPSUR. From the title alone, it seems like the type of text you are lo
Sources for learning (not just running) statistics/math through R There is "Introduction to Probability and Statistics Using R" by G. Jay Kerns available at http://ipsur.org/ and as the R package IPSUR. From the title alone, it seems like the type of text you are looking for.
Sources for learning (not just running) statistics/math through R There is "Introduction to Probability and Statistics Using R" by G. Jay Kerns available at http://ipsur.org/ and as the R package IPSUR. From the title alone, it seems like the type of text you are lo
12,705
Sources for learning (not just running) statistics/math through R
I think the benchmark in the field here is "An Introduction to Statistical Learning - with applications in R" http://www-bcf.usc.edu/~gareth/ISL/
Sources for learning (not just running) statistics/math through R
I think the benchmark in the field here is "An Introduction to Statistical Learning - with applications in R" http://www-bcf.usc.edu/~gareth/ISL/
Sources for learning (not just running) statistics/math through R I think the benchmark in the field here is "An Introduction to Statistical Learning - with applications in R" http://www-bcf.usc.edu/~gareth/ISL/
Sources for learning (not just running) statistics/math through R I think the benchmark in the field here is "An Introduction to Statistical Learning - with applications in R" http://www-bcf.usc.edu/~gareth/ISL/
12,706
Sources for learning (not just running) statistics/math through R
I recommend the R package swirl, which sounds exactly like what you're looking for- learning R and statistics, not only using R, but in R itself.
Sources for learning (not just running) statistics/math through R
I recommend the R package swirl, which sounds exactly like what you're looking for- learning R and statistics, not only using R, but in R itself.
Sources for learning (not just running) statistics/math through R I recommend the R package swirl, which sounds exactly like what you're looking for- learning R and statistics, not only using R, but in R itself.
Sources for learning (not just running) statistics/math through R I recommend the R package swirl, which sounds exactly like what you're looking for- learning R and statistics, not only using R, but in R itself.
12,707
Sources for learning (not just running) statistics/math through R
I really like the book "introductory statistics with R" a very practical book. It walks you through the basic statistics and implementations in R.
Sources for learning (not just running) statistics/math through R
I really like the book "introductory statistics with R" a very practical book. It walks you through the basic statistics and implementations in R.
Sources for learning (not just running) statistics/math through R I really like the book "introductory statistics with R" a very practical book. It walks you through the basic statistics and implementations in R.
Sources for learning (not just running) statistics/math through R I really like the book "introductory statistics with R" a very practical book. It walks you through the basic statistics and implementations in R.
12,708
Bootstrap-based confidence interval
The question is related to the fundamental construction of confidence intervals, and when it comes to bootstrapping, the answer depends upon which bootstrapping method that is used. Consider the following setup: $\hat{\theta}$ is an estimator of a real valued parameter $\theta$ with (an estimated) standard deviation $\...
Bootstrap-based confidence interval
The question is related to the fundamental construction of confidence intervals, and when it comes to bootstrapping, the answer depends upon which bootstrapping method that is used. Consider the follo
Bootstrap-based confidence interval The question is related to the fundamental construction of confidence intervals, and when it comes to bootstrapping, the answer depends upon which bootstrapping method that is used. Consider the following setup: $\hat{\theta}$ is an estimator of a real valued parameter $\theta$ with ...
Bootstrap-based confidence interval The question is related to the fundamental construction of confidence intervals, and when it comes to bootstrapping, the answer depends upon which bootstrapping method that is used. Consider the follo
12,709
Balancing Reconstruction vs KL Loss Variational Autoencoder
Little late to the party here and you're probably way past this, but it's well documented you have to "warm up" the KL loss term by starting at zero and training a bit on just reconstruction loss before introducing the KL loss or results will not be good. It's unclear from your post if you did this, but it's a classic...
Balancing Reconstruction vs KL Loss Variational Autoencoder
Little late to the party here and you're probably way past this, but it's well documented you have to "warm up" the KL loss term by starting at zero and training a bit on just reconstruction loss befo
Balancing Reconstruction vs KL Loss Variational Autoencoder Little late to the party here and you're probably way past this, but it's well documented you have to "warm up" the KL loss term by starting at zero and training a bit on just reconstruction loss before introducing the KL loss or results will not be good. It'...
Balancing Reconstruction vs KL Loss Variational Autoencoder Little late to the party here and you're probably way past this, but it's well documented you have to "warm up" the KL loss term by starting at zero and training a bit on just reconstruction loss befo
12,710
Balancing Reconstruction vs KL Loss Variational Autoencoder
However, when I decrease the weight of the KLL loss by 0.001, I get reasonable samples: (...) The problem is that the learned latent space is not smooth. Looks like overfitting. Remember that KL loss on the latent space sort of corresponds to regularization. Are there any suggestions on how to balance these two l...
Balancing Reconstruction vs KL Loss Variational Autoencoder
However, when I decrease the weight of the KLL loss by 0.001, I get reasonable samples: (...) The problem is that the learned latent space is not smooth. Looks like overfitting. Remember that KL
Balancing Reconstruction vs KL Loss Variational Autoencoder However, when I decrease the weight of the KLL loss by 0.001, I get reasonable samples: (...) The problem is that the learned latent space is not smooth. Looks like overfitting. Remember that KL loss on the latent space sort of corresponds to regularizati...
Balancing Reconstruction vs KL Loss Variational Autoencoder However, when I decrease the weight of the KLL loss by 0.001, I get reasonable samples: (...) The problem is that the learned latent space is not smooth. Looks like overfitting. Remember that KL
12,711
How to sample from Cantor distribution?
Easy: sample from a Uniform$(0,1)$ distribution and recode from binary to ternary, interpreting each "1" as a "2". (This is the inverse probability transform approach: it does indeed invert the CDF!) Here is an R implementation, written in a way that ought to port readily to almost any computing environment. binary.t...
How to sample from Cantor distribution?
Easy: sample from a Uniform$(0,1)$ distribution and recode from binary to ternary, interpreting each "1" as a "2". (This is the inverse probability transform approach: it does indeed invert the CDF!)
How to sample from Cantor distribution? Easy: sample from a Uniform$(0,1)$ distribution and recode from binary to ternary, interpreting each "1" as a "2". (This is the inverse probability transform approach: it does indeed invert the CDF!) Here is an R implementation, written in a way that ought to port readily to al...
How to sample from Cantor distribution? Easy: sample from a Uniform$(0,1)$ distribution and recode from binary to ternary, interpreting each "1" as a "2". (This is the inverse probability transform approach: it does indeed invert the CDF!)
12,712
Why exactly is the observed Fisher information used?
You've got four quanties here: the true parameter $\theta_0$, a consistent estimate $\hat \theta$, the expected information $I(\theta)$ at $\theta$ and the observed information $J(\theta)$ at $\theta$. These quantities are only equivalent asymptotically, but that is typically how they are used. The observed informatio...
Why exactly is the observed Fisher information used?
You've got four quanties here: the true parameter $\theta_0$, a consistent estimate $\hat \theta$, the expected information $I(\theta)$ at $\theta$ and the observed information $J(\theta)$ at $\theta$
Why exactly is the observed Fisher information used? You've got four quanties here: the true parameter $\theta_0$, a consistent estimate $\hat \theta$, the expected information $I(\theta)$ at $\theta$ and the observed information $J(\theta)$ at $\theta$. These quantities are only equivalent asymptotically, but that is ...
Why exactly is the observed Fisher information used? You've got four quanties here: the true parameter $\theta_0$, a consistent estimate $\hat \theta$, the expected information $I(\theta)$ at $\theta$ and the observed information $J(\theta)$ at $\theta$
12,713
Why exactly is the observed Fisher information used?
There have been some simulation studies that appear supportive of Efron & Hinkley's theoretical observations (which are mentioned in Andrew's answer), here's one I know of offhand: Maldonado, G. and Greenland, S. (1994). A comparison of the performance of model-based confidence intervals when the correct model form is ...
Why exactly is the observed Fisher information used?
There have been some simulation studies that appear supportive of Efron & Hinkley's theoretical observations (which are mentioned in Andrew's answer), here's one I know of offhand: Maldonado, G. and G
Why exactly is the observed Fisher information used? There have been some simulation studies that appear supportive of Efron & Hinkley's theoretical observations (which are mentioned in Andrew's answer), here's one I know of offhand: Maldonado, G. and Greenland, S. (1994). A comparison of the performance of model-based...
Why exactly is the observed Fisher information used? There have been some simulation studies that appear supportive of Efron & Hinkley's theoretical observations (which are mentioned in Andrew's answer), here's one I know of offhand: Maldonado, G. and G
12,714
Detecting outliers in count data
You cannot use the distance of an observation from a classical fit of your data to reliably detect outliers because the fitting procedure you use is itself liable to being pulled towards the outliers (this is called the masking effect). One simple way to reliably detect outliers is to use the general idea you suggested...
Detecting outliers in count data
You cannot use the distance of an observation from a classical fit of your data to reliably detect outliers because the fitting procedure you use is itself liable to being pulled towards the outliers
Detecting outliers in count data You cannot use the distance of an observation from a classical fit of your data to reliably detect outliers because the fitting procedure you use is itself liable to being pulled towards the outliers (this is called the masking effect). One simple way to reliably detect outliers is to u...
Detecting outliers in count data You cannot use the distance of an observation from a classical fit of your data to reliably detect outliers because the fitting procedure you use is itself liable to being pulled towards the outliers
12,715
Multiple imputation for outcome variables
As you suspected, it is valid to use multiple imputation for the outcome measure. There are cases where this is useful, but it can also be risky. I consider the situation where all covariates are complete, and the outcome is incomplete. If the imputation model is correct, we will obtain valid inferences on the paramet...
Multiple imputation for outcome variables
As you suspected, it is valid to use multiple imputation for the outcome measure. There are cases where this is useful, but it can also be risky. I consider the situation where all covariates are comp
Multiple imputation for outcome variables As you suspected, it is valid to use multiple imputation for the outcome measure. There are cases where this is useful, but it can also be risky. I consider the situation where all covariates are complete, and the outcome is incomplete. If the imputation model is correct, we w...
Multiple imputation for outcome variables As you suspected, it is valid to use multiple imputation for the outcome measure. There are cases where this is useful, but it can also be risky. I consider the situation where all covariates are comp
12,716
Multiple imputation for outcome variables
Imputing outcome data is very common and leads to correct inference when accounting for the random error. It sounds like what you're doing is single imputation, by imputing the missing values with a conditional mean under a complete case analysis. What you should be doing is multiple imputation which, for continuous co...
Multiple imputation for outcome variables
Imputing outcome data is very common and leads to correct inference when accounting for the random error. It sounds like what you're doing is single imputation, by imputing the missing values with a c
Multiple imputation for outcome variables Imputing outcome data is very common and leads to correct inference when accounting for the random error. It sounds like what you're doing is single imputation, by imputing the missing values with a conditional mean under a complete case analysis. What you should be doing is mu...
Multiple imputation for outcome variables Imputing outcome data is very common and leads to correct inference when accounting for the random error. It sounds like what you're doing is single imputation, by imputing the missing values with a c
12,717
Central limit theorem versus law of large numbers
The OP says The central limit theorem states that the mean of i.i.d. variables, as N goes to infinity, becomes normally distributed. I will take this to mean that it is the OP's belief that for i.i.d. random variables $X_i$ with mean $\mu$ and standard deviation $\sigma$, the cumulative distribution function $F_{Z_n...
Central limit theorem versus law of large numbers
The OP says The central limit theorem states that the mean of i.i.d. variables, as N goes to infinity, becomes normally distributed. I will take this to mean that it is the OP's belief that for i.i.
Central limit theorem versus law of large numbers The OP says The central limit theorem states that the mean of i.i.d. variables, as N goes to infinity, becomes normally distributed. I will take this to mean that it is the OP's belief that for i.i.d. random variables $X_i$ with mean $\mu$ and standard deviation $\sig...
Central limit theorem versus law of large numbers The OP says The central limit theorem states that the mean of i.i.d. variables, as N goes to infinity, becomes normally distributed. I will take this to mean that it is the OP's belief that for i.i.
12,718
Central limit theorem versus law of large numbers
For law of large numbers, you need to have all variables to be defined on the same probability space (as the law of large numbers is a statement about probability of an event determined by $\bar X_n$, for all $n$ simultaneously). For convergence in distribution, you can have different probability spaces, and that simpl...
Central limit theorem versus law of large numbers
For law of large numbers, you need to have all variables to be defined on the same probability space (as the law of large numbers is a statement about probability of an event determined by $\bar X_n$,
Central limit theorem versus law of large numbers For law of large numbers, you need to have all variables to be defined on the same probability space (as the law of large numbers is a statement about probability of an event determined by $\bar X_n$, for all $n$ simultaneously). For convergence in distribution, you can...
Central limit theorem versus law of large numbers For law of large numbers, you need to have all variables to be defined on the same probability space (as the law of large numbers is a statement about probability of an event determined by $\bar X_n$,
12,719
Central limit theorem versus law of large numbers
First, though there are many definitions, one of the standard forms of the central limit theorem says that $\sqrt{n}(\bar{X}_n-EX)$ converges in distribution to $\mathcal N(0, Var(X))$, where $\bar{X}$ is the sample mean of $n$ iid copies of some random variable $X$. Secondly, suppose we have two independent random va...
Central limit theorem versus law of large numbers
First, though there are many definitions, one of the standard forms of the central limit theorem says that $\sqrt{n}(\bar{X}_n-EX)$ converges in distribution to $\mathcal N(0, Var(X))$, where $\bar{X}
Central limit theorem versus law of large numbers First, though there are many definitions, one of the standard forms of the central limit theorem says that $\sqrt{n}(\bar{X}_n-EX)$ converges in distribution to $\mathcal N(0, Var(X))$, where $\bar{X}$ is the sample mean of $n$ iid copies of some random variable $X$. S...
Central limit theorem versus law of large numbers First, though there are many definitions, one of the standard forms of the central limit theorem says that $\sqrt{n}(\bar{X}_n-EX)$ converges in distribution to $\mathcal N(0, Var(X))$, where $\bar{X}
12,720
Convolutional neural network for time series? [closed]
If you want an open source black-box solution try looking at Weka, a java library of ML algorithms. This guy has also used Covolutional Layers in Weka and you could edit his classification code to suit a time series classification task. As for coding your own... I am working on the same problem using the python library...
Convolutional neural network for time series? [closed]
If you want an open source black-box solution try looking at Weka, a java library of ML algorithms. This guy has also used Covolutional Layers in Weka and you could edit his classification code to sui
Convolutional neural network for time series? [closed] If you want an open source black-box solution try looking at Weka, a java library of ML algorithms. This guy has also used Covolutional Layers in Weka and you could edit his classification code to suit a time series classification task. As for coding your own... I ...
Convolutional neural network for time series? [closed] If you want an open source black-box solution try looking at Weka, a java library of ML algorithms. This guy has also used Covolutional Layers in Weka and you could edit his classification code to sui
12,721
Convolutional neural network for time series? [closed]
It is entirely possible to use a CNN to make time series predictions be it regression or classification. CNNs are good at finding local patterns and in fact CNNs work with the assumption that local patterns are relevant everywhere. Also convolution is a well-known operation in time series and signal processing. Another...
Convolutional neural network for time series? [closed]
It is entirely possible to use a CNN to make time series predictions be it regression or classification. CNNs are good at finding local patterns and in fact CNNs work with the assumption that local pa
Convolutional neural network for time series? [closed] It is entirely possible to use a CNN to make time series predictions be it regression or classification. CNNs are good at finding local patterns and in fact CNNs work with the assumption that local patterns are relevant everywhere. Also convolution is a well-known ...
Convolutional neural network for time series? [closed] It is entirely possible to use a CNN to make time series predictions be it regression or classification. CNNs are good at finding local patterns and in fact CNNs work with the assumption that local pa
12,722
Whether distributions with the same moments are identical
Let me answer in reverse order: 2. Yes. If their MGFs exist, they'll be the same*. see here and here for example Indeed it follows from the result you give in the post this comes from; if the MGF uniquely** determines the distribution, and two distributions have MGFs and they have the same distribution, they must have ...
Whether distributions with the same moments are identical
Let me answer in reverse order: 2. Yes. If their MGFs exist, they'll be the same*. see here and here for example Indeed it follows from the result you give in the post this comes from; if the MGF uniq
Whether distributions with the same moments are identical Let me answer in reverse order: 2. Yes. If their MGFs exist, they'll be the same*. see here and here for example Indeed it follows from the result you give in the post this comes from; if the MGF uniquely** determines the distribution, and two distributions have...
Whether distributions with the same moments are identical Let me answer in reverse order: 2. Yes. If their MGFs exist, they'll be the same*. see here and here for example Indeed it follows from the result you give in the post this comes from; if the MGF uniq
12,723
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
Short answer since I don't have time for better: this is a challenging problem; binary data almost always requires some kind of binning or smoothing to assess goodness of fit. It was somewhat helpful to use fortify.lmerMod (from lme4, experimental) in conjunction with ggplot2 and particularly geom_smooth() to draw esse...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
Short answer since I don't have time for better: this is a challenging problem; binary data almost always requires some kind of binning or smoothing to assess goodness of fit. It was somewhat helpful
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? Short answer since I don't have time for better: this is a challenging problem; binary data almost always requires some kind of binning or smoothing to assess goodness of fit. It was somewhat helpful to use fortify.lmerMod (from lme4, experimental) in c...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? Short answer since I don't have time for better: this is a challenging problem; binary data almost always requires some kind of binning or smoothing to assess goodness of fit. It was somewhat helpful
12,724
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
This is very common theme on biostatistics/epidemiology courses, and there are not very good solutions for it, basically due to the nature of the model. Often the solution has been to avoid detailed diagnostics using the residuals. Ben already wrote that diagnostics often require either binning or smoothing. Binning of...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
This is very common theme on biostatistics/epidemiology courses, and there are not very good solutions for it, basically due to the nature of the model. Often the solution has been to avoid detailed d
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? This is very common theme on biostatistics/epidemiology courses, and there are not very good solutions for it, basically due to the nature of the model. Often the solution has been to avoid detailed diagnostics using the residuals. Ben already wrote tha...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? This is very common theme on biostatistics/epidemiology courses, and there are not very good solutions for it, basically due to the nature of the model. Often the solution has been to avoid detailed d
12,725
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
You can plot the residuals against the predictors using simulation techniques in DHARMa package, it also offers a range of diagnostics such as overdispersion, and outliers, I think its a practical and simple assessment tool for GLMM. Check it out: https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
You can plot the residuals against the predictors using simulation techniques in DHARMa package, it also offers a range of diagnostics such as overdispersion, and outliers, I think its a practical and
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? You can plot the residuals against the predictors using simulation techniques in DHARMa package, it also offers a range of diagnostics such as overdispersion, and outliers, I think its a practical and simple assessment tool for GLMM. Check it out: https...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? You can plot the residuals against the predictors using simulation techniques in DHARMa package, it also offers a range of diagnostics such as overdispersion, and outliers, I think its a practical and
12,726
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
You could use AIC instead of residual plots to check fit of model. Command in R: AIC(model1) it will give you a number...so then you need to compare this with another model (with more predictors, for example) -- AIC(model2), which will yield another number. Compare the two outputs, and you'll want the model with the lo...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
You could use AIC instead of residual plots to check fit of model. Command in R: AIC(model1) it will give you a number...so then you need to compare this with another model (with more predictors, for
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? You could use AIC instead of residual plots to check fit of model. Command in R: AIC(model1) it will give you a number...so then you need to compare this with another model (with more predictors, for example) -- AIC(model2), which will yield another num...
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? You could use AIC instead of residual plots to check fit of model. Command in R: AIC(model1) it will give you a number...so then you need to compare this with another model (with more predictors, for
12,727
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
Fitted vs residuals plot should not show any (clear) pattern. The plot shows that the model does not work well with the data. See http://www.r-bloggers.com/model-validation-interpreting-residual-plots/
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
Fitted vs residuals plot should not show any (clear) pattern. The plot shows that the model does not work well with the data. See http://www.r-bloggers.com/model-validation-interpreting-residual-plots
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? Fitted vs residuals plot should not show any (clear) pattern. The plot shows that the model does not work well with the data. See http://www.r-bloggers.com/model-validation-interpreting-residual-plots/
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)? Fitted vs residuals plot should not show any (clear) pattern. The plot shows that the model does not work well with the data. See http://www.r-bloggers.com/model-validation-interpreting-residual-plots
12,728
Comparing AIC of a model and its log-transformed version
You cannot compare the AIC or BIC when fitting to two different data sets i.e. $Y$ and $Z$. You only can compare two models based on AIC or BIC just when fitting to the same data set. Have a look at Model Selection and Multi-model Inference: A Practical Information-theoretic Approach (Burnham and Anderson, 2004). They...
Comparing AIC of a model and its log-transformed version
You cannot compare the AIC or BIC when fitting to two different data sets i.e. $Y$ and $Z$. You only can compare two models based on AIC or BIC just when fitting to the same data set. Have a look at
Comparing AIC of a model and its log-transformed version You cannot compare the AIC or BIC when fitting to two different data sets i.e. $Y$ and $Z$. You only can compare two models based on AIC or BIC just when fitting to the same data set. Have a look at Model Selection and Multi-model Inference: A Practical Informat...
Comparing AIC of a model and its log-transformed version You cannot compare the AIC or BIC when fitting to two different data sets i.e. $Y$ and $Z$. You only can compare two models based on AIC or BIC just when fitting to the same data set. Have a look at
12,729
Comparing AIC of a model and its log-transformed version
Akaike (1978, pg. 224) describes how the AIC can be adjusted in the presence of a transformed outcome variable to enable model comparison. He states: “the effect of transforming the variable is represented simply by the multiplication of the likelihood by the corresponding Jacobian to the AIC ... for the case of $\log\...
Comparing AIC of a model and its log-transformed version
Akaike (1978, pg. 224) describes how the AIC can be adjusted in the presence of a transformed outcome variable to enable model comparison. He states: “the effect of transforming the variable is repres
Comparing AIC of a model and its log-transformed version Akaike (1978, pg. 224) describes how the AIC can be adjusted in the presence of a transformed outcome variable to enable model comparison. He states: “the effect of transforming the variable is represented simply by the multiplication of the likelihood by the cor...
Comparing AIC of a model and its log-transformed version Akaike (1978, pg. 224) describes how the AIC can be adjusted in the presence of a transformed outcome variable to enable model comparison. He states: “the effect of transforming the variable is repres
12,730
Comparing AIC of a model and its log-transformed version
Here is an example that elaborates on Ben Bolker's response: seedrates <- data.frame(rate = c(50, 75, 100, 125, 150), grain = c(21.2, 19.9, 19.2, 18.4, 17.9)) quad.lm <- lm(grain~poly(rate,2), data=seedrates) loglin.lm <- lm(log(grain)~log(rate), data=seedrates) oldopt <- options(digits=2) AIC(...
Comparing AIC of a model and its log-transformed version
Here is an example that elaborates on Ben Bolker's response: seedrates <- data.frame(rate = c(50, 75, 100, 125, 150), grain = c(21.2, 19.9, 19.2, 18.4, 17.9)) quad.lm <- lm(gr
Comparing AIC of a model and its log-transformed version Here is an example that elaborates on Ben Bolker's response: seedrates <- data.frame(rate = c(50, 75, 100, 125, 150), grain = c(21.2, 19.9, 19.2, 18.4, 17.9)) quad.lm <- lm(grain~poly(rate,2), data=seedrates) loglin.lm <- lm(log(grain)~lo...
Comparing AIC of a model and its log-transformed version Here is an example that elaborates on Ben Bolker's response: seedrates <- data.frame(rate = c(50, 75, 100, 125, 150), grain = c(21.2, 19.9, 19.2, 18.4, 17.9)) quad.lm <- lm(gr
12,731
Which distributions have closed-form solutions for maximum likelihood estimation?
Without any appreciable loss of generality we may assume that the probability density (or mass) $f(x_i)$ for any observation $x_i$ (out of $n$ observations) is strictly positive, enabling us to write it as an exponential $$ f(x_i) = \exp{(g(x_i,\theta))}$$ for a parameter vector $\theta = (\theta_j)$. Equating the gra...
Which distributions have closed-form solutions for maximum likelihood estimation?
Without any appreciable loss of generality we may assume that the probability density (or mass) $f(x_i)$ for any observation $x_i$ (out of $n$ observations) is strictly positive, enabling us to write
Which distributions have closed-form solutions for maximum likelihood estimation? Without any appreciable loss of generality we may assume that the probability density (or mass) $f(x_i)$ for any observation $x_i$ (out of $n$ observations) is strictly positive, enabling us to write it as an exponential $$ f(x_i) = \exp...
Which distributions have closed-form solutions for maximum likelihood estimation? Without any appreciable loss of generality we may assume that the probability density (or mass) $f(x_i)$ for any observation $x_i$ (out of $n$ observations) is strictly positive, enabling us to write
12,732
Which distributions have closed-form solutions for maximum likelihood estimation?
I don't know if I could list them all. The exponential, normal and binomial come to mind and they all fall into the class of exponential families. The exponential family has its sufficient statistic in the exponent and the mle is often a nice function of this sufficient statistic.
Which distributions have closed-form solutions for maximum likelihood estimation?
I don't know if I could list them all. The exponential, normal and binomial come to mind and they all fall into the class of exponential families. The exponential family has its sufficient statistic
Which distributions have closed-form solutions for maximum likelihood estimation? I don't know if I could list them all. The exponential, normal and binomial come to mind and they all fall into the class of exponential families. The exponential family has its sufficient statistic in the exponent and the mle is often ...
Which distributions have closed-form solutions for maximum likelihood estimation? I don't know if I could list them all. The exponential, normal and binomial come to mind and they all fall into the class of exponential families. The exponential family has its sufficient statistic
12,733
Variable importance from GLMNET
As far as I know glmnet does not calculate the standard errors of regression coefficients (since it fits model parameters using cyclic coordinate descent). So, if you need standardized regression coefficients, you will need to use some other method (e.g. glm) Having said that, if the explanatory variables are standardi...
Variable importance from GLMNET
As far as I know glmnet does not calculate the standard errors of regression coefficients (since it fits model parameters using cyclic coordinate descent). So, if you need standardized regression coef
Variable importance from GLMNET As far as I know glmnet does not calculate the standard errors of regression coefficients (since it fits model parameters using cyclic coordinate descent). So, if you need standardized regression coefficients, you will need to use some other method (e.g. glm) Having said that, if the ex...
Variable importance from GLMNET As far as I know glmnet does not calculate the standard errors of regression coefficients (since it fits model parameters using cyclic coordinate descent). So, if you need standardized regression coef
12,734
Variable importance from GLMNET
To get the coefficient in a space that lets you directly compare their importance, you have to standardize them. I wrote a note on Thinklab to discuss standardization of logistic regression coefficients. (Very) Long story short, I advise to use the Agresti method: # if X is the input matrix of the glmnet function, # an...
Variable importance from GLMNET
To get the coefficient in a space that lets you directly compare their importance, you have to standardize them. I wrote a note on Thinklab to discuss standardization of logistic regression coefficien
Variable importance from GLMNET To get the coefficient in a space that lets you directly compare their importance, you have to standardize them. I wrote a note on Thinklab to discuss standardization of logistic regression coefficients. (Very) Long story short, I advise to use the Agresti method: # if X is the input ma...
Variable importance from GLMNET To get the coefficient in a space that lets you directly compare their importance, you have to standardize them. I wrote a note on Thinklab to discuss standardization of logistic regression coefficien
12,735
Is there i.i.d. assumption on logistic regression?
From your previous question you learned that GLM is described in terms of probability distribution, linear predictor $\eta$ and link function $g$ and is described as $$ \begin{align} \eta &= X\beta \\ E(Y|X) &= \mu = g^{-1}(\eta) \end{align} $$ where $g$ is a logit link function and $Y$ is assumed to follow a Bernoulli...
Is there i.i.d. assumption on logistic regression?
From your previous question you learned that GLM is described in terms of probability distribution, linear predictor $\eta$ and link function $g$ and is described as $$ \begin{align} \eta &= X\beta \\
Is there i.i.d. assumption on logistic regression? From your previous question you learned that GLM is described in terms of probability distribution, linear predictor $\eta$ and link function $g$ and is described as $$ \begin{align} \eta &= X\beta \\ E(Y|X) &= \mu = g^{-1}(\eta) \end{align} $$ where $g$ is a logit lin...
Is there i.i.d. assumption on logistic regression? From your previous question you learned that GLM is described in terms of probability distribution, linear predictor $\eta$ and link function $g$ and is described as $$ \begin{align} \eta &= X\beta \\
12,736
Is there i.i.d. assumption on logistic regression?
As has been stated, while we often consider the case of iid errors in linear regression, this does not have a direct equivalent in most generalized linear models (including logistic regression). In logistic regression, we typically employ the assumption of independence of outcomes that all have a very strict relation (...
Is there i.i.d. assumption on logistic regression?
As has been stated, while we often consider the case of iid errors in linear regression, this does not have a direct equivalent in most generalized linear models (including logistic regression). In lo
Is there i.i.d. assumption on logistic regression? As has been stated, while we often consider the case of iid errors in linear regression, this does not have a direct equivalent in most generalized linear models (including logistic regression). In logistic regression, we typically employ the assumption of independence...
Is there i.i.d. assumption on logistic regression? As has been stated, while we often consider the case of iid errors in linear regression, this does not have a direct equivalent in most generalized linear models (including logistic regression). In lo
12,737
Why use group lasso instead of lasso?
Intuitively speaking, the group lasso can be preferred to the lasso since it provides a means for us to incorporate (a certain type of) additional information into our estimate for the true coefficient $\beta^*$. As an extreme scenario, considering the following: With $y \sim \mathcal{N} (X \beta^*, \sigma^2 I )$, put ...
Why use group lasso instead of lasso?
Intuitively speaking, the group lasso can be preferred to the lasso since it provides a means for us to incorporate (a certain type of) additional information into our estimate for the true coefficien
Why use group lasso instead of lasso? Intuitively speaking, the group lasso can be preferred to the lasso since it provides a means for us to incorporate (a certain type of) additional information into our estimate for the true coefficient $\beta^*$. As an extreme scenario, considering the following: With $y \sim \math...
Why use group lasso instead of lasso? Intuitively speaking, the group lasso can be preferred to the lasso since it provides a means for us to incorporate (a certain type of) additional information into our estimate for the true coefficien
12,738
Why use group lasso instead of lasso?
Ben's answer is the most general result. But the intuitive answer to the OP is motivated by the case of categorical predictors, which are usually encoded as multiple dummy variables: one for each category. It makes sense in many analyses to consider these dummy variables (representing one categorical predictor) togethe...
Why use group lasso instead of lasso?
Ben's answer is the most general result. But the intuitive answer to the OP is motivated by the case of categorical predictors, which are usually encoded as multiple dummy variables: one for each cate
Why use group lasso instead of lasso? Ben's answer is the most general result. But the intuitive answer to the OP is motivated by the case of categorical predictors, which are usually encoded as multiple dummy variables: one for each category. It makes sense in many analyses to consider these dummy variables (represent...
Why use group lasso instead of lasso? Ben's answer is the most general result. But the intuitive answer to the OP is motivated by the case of categorical predictors, which are usually encoded as multiple dummy variables: one for each cate
12,739
How to transform negative values to logarithms?
Since logarithm is only defined for positive numbers, you can't take the logarithm of negative values. However, if you are aiming at obtaining a better distribution for your data, you can apply the following transformation. Suppose you have skewed negative data: x <- rlnorm(n = 1e2, meanlog = 0, sdlog = 1) x <- x - 5 p...
How to transform negative values to logarithms?
Since logarithm is only defined for positive numbers, you can't take the logarithm of negative values. However, if you are aiming at obtaining a better distribution for your data, you can apply the fo
How to transform negative values to logarithms? Since logarithm is only defined for positive numbers, you can't take the logarithm of negative values. However, if you are aiming at obtaining a better distribution for your data, you can apply the following transformation. Suppose you have skewed negative data: x <- rlno...
How to transform negative values to logarithms? Since logarithm is only defined for positive numbers, you can't take the logarithm of negative values. However, if you are aiming at obtaining a better distribution for your data, you can apply the fo
12,740
How to transform negative values to logarithms?
This has been covered in detail in the comments, but there still isn't an answer stating this. So for the benefit of future readers: Please DON'T fiddle with your negative values (especially differences!) so that you can apply a log transformation. Strategies such as adding constants introduce bias; this can work out a...
How to transform negative values to logarithms?
This has been covered in detail in the comments, but there still isn't an answer stating this. So for the benefit of future readers: Please DON'T fiddle with your negative values (especially differenc
How to transform negative values to logarithms? This has been covered in detail in the comments, but there still isn't an answer stating this. So for the benefit of future readers: Please DON'T fiddle with your negative values (especially differences!) so that you can apply a log transformation. Strategies such as addi...
How to transform negative values to logarithms? This has been covered in detail in the comments, but there still isn't an answer stating this. So for the benefit of future readers: Please DON'T fiddle with your negative values (especially differenc
12,741
Is R-squared value appropriate for comparing models?
I think the crucial part to consider in answering your question is I'm trying to identify the best model to predict the prices of automobiles because this statement implies something about why you want to use the model. Model choice and evaluation should be based on what you want to achieve with your fitted values. F...
Is R-squared value appropriate for comparing models?
I think the crucial part to consider in answering your question is I'm trying to identify the best model to predict the prices of automobiles because this statement implies something about why you w
Is R-squared value appropriate for comparing models? I think the crucial part to consider in answering your question is I'm trying to identify the best model to predict the prices of automobiles because this statement implies something about why you want to use the model. Model choice and evaluation should be based o...
Is R-squared value appropriate for comparing models? I think the crucial part to consider in answering your question is I'm trying to identify the best model to predict the prices of automobiles because this statement implies something about why you w
12,742
Is there a statistical test to compare two samples of size 1 and 3?
Note gung's question; it matters. I will assume that the treatment was the same for every tank in the treatment group. If you can argue the variance would be equal for the two groups (which you would typically assume for a two sample t-test anyway), you can do a test. You just can't check that assumption, no matter how...
Is there a statistical test to compare two samples of size 1 and 3?
Note gung's question; it matters. I will assume that the treatment was the same for every tank in the treatment group. If you can argue the variance would be equal for the two groups (which you would
Is there a statistical test to compare two samples of size 1 and 3? Note gung's question; it matters. I will assume that the treatment was the same for every tank in the treatment group. If you can argue the variance would be equal for the two groups (which you would typically assume for a two sample t-test anyway), yo...
Is there a statistical test to compare two samples of size 1 and 3? Note gung's question; it matters. I will assume that the treatment was the same for every tank in the treatment group. If you can argue the variance would be equal for the two groups (which you would
12,743
Comparing clusterings: Rand Index vs Variation of Information
In my opinion, there are huge differences. The Rand index is very much affected by the granularity of the clusterings on which it operates. In what follows I'll use the Mirkin distance, which is an adjusted form of the Rand index (easy to see, but see e.g. Meila). I'll also use the split/join distance, which is also me...
Comparing clusterings: Rand Index vs Variation of Information
In my opinion, there are huge differences. The Rand index is very much affected by the granularity of the clusterings on which it operates. In what follows I'll use the Mirkin distance, which is an ad
Comparing clusterings: Rand Index vs Variation of Information In my opinion, there are huge differences. The Rand index is very much affected by the granularity of the clusterings on which it operates. In what follows I'll use the Mirkin distance, which is an adjusted form of the Rand index (easy to see, but see e.g. M...
Comparing clusterings: Rand Index vs Variation of Information In my opinion, there are huge differences. The Rand index is very much affected by the granularity of the clusterings on which it operates. In what follows I'll use the Mirkin distance, which is an ad
12,744
Comparing clusterings: Rand Index vs Variation of Information
The difference between the two methods is subtle. The best way to think about it is to consider the lattice defined by the merge-split operation on clusterings. Both these measures can be reconstructed by defining a function $f$ on a clustering, and then defining the distance between two clusterings by the formula: \[ ...
Comparing clusterings: Rand Index vs Variation of Information
The difference between the two methods is subtle. The best way to think about it is to consider the lattice defined by the merge-split operation on clusterings. Both these measures can be reconstructe
Comparing clusterings: Rand Index vs Variation of Information The difference between the two methods is subtle. The best way to think about it is to consider the lattice defined by the merge-split operation on clusterings. Both these measures can be reconstructed by defining a function $f$ on a clustering, and then def...
Comparing clusterings: Rand Index vs Variation of Information The difference between the two methods is subtle. The best way to think about it is to consider the lattice defined by the merge-split operation on clusterings. Both these measures can be reconstructe
12,745
Interpreting distance from hyperplane in SVM
Let me first answer your question in general. The SVM is not a probabilistic model. One reason is that it does not correspond to a normalizable likelihood. For example in regularized least squares you have the loss function $\sum_i \|y_i - \langle w, x_i\rangle - b\|_2^2$ and the regularizer $\|w\|_2^2$. The weight vec...
Interpreting distance from hyperplane in SVM
Let me first answer your question in general. The SVM is not a probabilistic model. One reason is that it does not correspond to a normalizable likelihood. For example in regularized least squares you
Interpreting distance from hyperplane in SVM Let me first answer your question in general. The SVM is not a probabilistic model. One reason is that it does not correspond to a normalizable likelihood. For example in regularized least squares you have the loss function $\sum_i \|y_i - \langle w, x_i\rangle - b\|_2^2$ an...
Interpreting distance from hyperplane in SVM Let me first answer your question in general. The SVM is not a probabilistic model. One reason is that it does not correspond to a normalizable likelihood. For example in regularized least squares you
12,746
Good online resource with tips on graphing association between two numeric variables under various conditions
I can't think of great online resources off the top of my head, but a nice (and easily downloadable) book chapter that narrates how to visually explore a large, multidimensional data set in a thoughtful way is Brendan O'Connor and Lukas Biewald's chapter (warning: link is directly to a PDF) from Beautiful Data. The cha...
Good online resource with tips on graphing association between two numeric variables under various c
I can't think of great online resources off the top of my head, but a nice (and easily downloadable) book chapter that narrates how to visually explore a large, multidimensional data set in a thoughtf
Good online resource with tips on graphing association between two numeric variables under various conditions I can't think of great online resources off the top of my head, but a nice (and easily downloadable) book chapter that narrates how to visually explore a large, multidimensional data set in a thoughtful way is ...
Good online resource with tips on graphing association between two numeric variables under various c I can't think of great online resources off the top of my head, but a nice (and easily downloadable) book chapter that narrates how to visually explore a large, multidimensional data set in a thoughtf
12,747
Good online resource with tips on graphing association between two numeric variables under various conditions
Recent references: Kelleher and Wagner 2011 "Ten guidelines for effective data visualization in scientific publications" provides a nice set of rules. The rules, with references (but not the full article) are available without subscription, although university students would likely have full access. United Nations 200...
Good online resource with tips on graphing association between two numeric variables under various c
Recent references: Kelleher and Wagner 2011 "Ten guidelines for effective data visualization in scientific publications" provides a nice set of rules. The rules, with references (but not the full art
Good online resource with tips on graphing association between two numeric variables under various conditions Recent references: Kelleher and Wagner 2011 "Ten guidelines for effective data visualization in scientific publications" provides a nice set of rules. The rules, with references (but not the full article) are ...
Good online resource with tips on graphing association between two numeric variables under various c Recent references: Kelleher and Wagner 2011 "Ten guidelines for effective data visualization in scientific publications" provides a nice set of rules. The rules, with references (but not the full art
12,748
How to choose between learning algorithms
There is a package for "R" called "caret," which stands for "classification and regression testing." I think it would be a good place for you to start, as it will easily allow you to apply a dozen or so different learning algorithms to your data, and then cross-validate them to estimate how accurate they each are. Her...
How to choose between learning algorithms
There is a package for "R" called "caret," which stands for "classification and regression testing." I think it would be a good place for you to start, as it will easily allow you to apply a dozen or
How to choose between learning algorithms There is a package for "R" called "caret," which stands for "classification and regression testing." I think it would be a good place for you to start, as it will easily allow you to apply a dozen or so different learning algorithms to your data, and then cross-validate them t...
How to choose between learning algorithms There is a package for "R" called "caret," which stands for "classification and regression testing." I think it would be a good place for you to start, as it will easily allow you to apply a dozen or
12,749
How to choose between learning algorithms
I would use probability theory to start with, and then pick whichever algorithm best calculates what probability theory tells you to do. So you have training data $T$, and some new precursors $X$, and an object to classify $Y$, as well as your prior information $I$. So you want to know about $Y$. Then probability the...
How to choose between learning algorithms
I would use probability theory to start with, and then pick whichever algorithm best calculates what probability theory tells you to do. So you have training data $T$, and some new precursors $X$, an
How to choose between learning algorithms I would use probability theory to start with, and then pick whichever algorithm best calculates what probability theory tells you to do. So you have training data $T$, and some new precursors $X$, and an object to classify $Y$, as well as your prior information $I$. So you wan...
How to choose between learning algorithms I would use probability theory to start with, and then pick whichever algorithm best calculates what probability theory tells you to do. So you have training data $T$, and some new precursors $X$, an
12,750
Textbook on the *theory* of neural nets/ML algorithms?
Foundations of Machine Learning, by Mehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar, is a 2012 book on machine learning theory. Understanding Machine Learning: From Theory to Algorithms, by Shai Shalev-Shwartz and Shai Ben-David, is a similar 2014 book that's fairly well-known and targeted a little more introduc...
Textbook on the *theory* of neural nets/ML algorithms?
Foundations of Machine Learning, by Mehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar, is a 2012 book on machine learning theory. Understanding Machine Learning: From Theory to Algorithms, by Sha
Textbook on the *theory* of neural nets/ML algorithms? Foundations of Machine Learning, by Mehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar, is a 2012 book on machine learning theory. Understanding Machine Learning: From Theory to Algorithms, by Shai Shalev-Shwartz and Shai Ben-David, is a similar 2014 book that'...
Textbook on the *theory* of neural nets/ML algorithms? Foundations of Machine Learning, by Mehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar, is a 2012 book on machine learning theory. Understanding Machine Learning: From Theory to Algorithms, by Sha
12,751
Textbook on the *theory* of neural nets/ML algorithms?
Machine Learning: a Probabilistic Perspective by Kevin P. Murphy explains a lot of theory from a Bayesian perspective (I've only used it for logistic regression, but I thought it was quite good). The whole book is available online as a PDF by searching on Google.
Textbook on the *theory* of neural nets/ML algorithms?
Machine Learning: a Probabilistic Perspective by Kevin P. Murphy explains a lot of theory from a Bayesian perspective (I've only used it for logistic regression, but I thought it was quite good). The
Textbook on the *theory* of neural nets/ML algorithms? Machine Learning: a Probabilistic Perspective by Kevin P. Murphy explains a lot of theory from a Bayesian perspective (I've only used it for logistic regression, but I thought it was quite good). The whole book is available online as a PDF by searching on Google.
Textbook on the *theory* of neural nets/ML algorithms? Machine Learning: a Probabilistic Perspective by Kevin P. Murphy explains a lot of theory from a Bayesian perspective (I've only used it for logistic regression, but I thought it was quite good). The
12,752
Textbook on the *theory* of neural nets/ML algorithms?
Deep Learning (Adaptive Computation and Machine Learning series). This is written by Ian Goodfellow, Yoshua Bengio, Aaron Courville. As per the agreement of the author with MIT Press, you can read the legally free copy available on the browser in this website. www.deeplearningbook.org This is good for pure mathematics...
Textbook on the *theory* of neural nets/ML algorithms?
Deep Learning (Adaptive Computation and Machine Learning series). This is written by Ian Goodfellow, Yoshua Bengio, Aaron Courville. As per the agreement of the author with MIT Press, you can read th
Textbook on the *theory* of neural nets/ML algorithms? Deep Learning (Adaptive Computation and Machine Learning series). This is written by Ian Goodfellow, Yoshua Bengio, Aaron Courville. As per the agreement of the author with MIT Press, you can read the legally free copy available on the browser in this website. www...
Textbook on the *theory* of neural nets/ML algorithms? Deep Learning (Adaptive Computation and Machine Learning series). This is written by Ian Goodfellow, Yoshua Bengio, Aaron Courville. As per the agreement of the author with MIT Press, you can read th
12,753
Textbook on the *theory* of neural nets/ML algorithms?
Neural Network Design (Martin T. Hagan, Howard B. Demuth, Mark Hudson Beale, Orlando De Jesús) has some nice discussion of optimization in the context of neural nets.
Textbook on the *theory* of neural nets/ML algorithms?
Neural Network Design (Martin T. Hagan, Howard B. Demuth, Mark Hudson Beale, Orlando De Jesús) has some nice discussion of optimization in the context of neural nets.
Textbook on the *theory* of neural nets/ML algorithms? Neural Network Design (Martin T. Hagan, Howard B. Demuth, Mark Hudson Beale, Orlando De Jesús) has some nice discussion of optimization in the context of neural nets.
Textbook on the *theory* of neural nets/ML algorithms? Neural Network Design (Martin T. Hagan, Howard B. Demuth, Mark Hudson Beale, Orlando De Jesús) has some nice discussion of optimization in the context of neural nets.
12,754
Updating SVD decomposition after adding one new row to the matrix
Yes, one can update an SVD decomposition after adding one new row to the existing matrix. In general this "add one to" problem formulation is known as rank one updates. The MathOverflow link provided by @amoeba on "efficient rank-two updates of an eigenvalue decomposition" is a great first step if you want to start lo...
Updating SVD decomposition after adding one new row to the matrix
Yes, one can update an SVD decomposition after adding one new row to the existing matrix. In general this "add one to" problem formulation is known as rank one updates. The MathOverflow link provided
Updating SVD decomposition after adding one new row to the matrix Yes, one can update an SVD decomposition after adding one new row to the existing matrix. In general this "add one to" problem formulation is known as rank one updates. The MathOverflow link provided by @amoeba on "efficient rank-two updates of an eigen...
Updating SVD decomposition after adding one new row to the matrix Yes, one can update an SVD decomposition after adding one new row to the existing matrix. In general this "add one to" problem formulation is known as rank one updates. The MathOverflow link provided
12,755
Clustering -- Intuition behind Kleinberg's Impossibility Theorem
One way or another, every clustering algorithm relies on some notion of “proximity” of points. It seems intuitively clear that you can either use a relative (scale-invariant) notion or an absolute (consistent) notion of proximity, but not both. I will first try to illustrate this with an example, and then go on to s...
Clustering -- Intuition behind Kleinberg's Impossibility Theorem
One way or another, every clustering algorithm relies on some notion of “proximity” of points. It seems intuitively clear that you can either use a relative (scale-invariant) notion or an absolute (c
Clustering -- Intuition behind Kleinberg's Impossibility Theorem One way or another, every clustering algorithm relies on some notion of “proximity” of points. It seems intuitively clear that you can either use a relative (scale-invariant) notion or an absolute (consistent) notion of proximity, but not both. I will ...
Clustering -- Intuition behind Kleinberg's Impossibility Theorem One way or another, every clustering algorithm relies on some notion of “proximity” of points. It seems intuitively clear that you can either use a relative (scale-invariant) notion or an absolute (c
12,756
Clustering -- Intuition behind Kleinberg's Impossibility Theorem
This is the intuition I came up with (a snippet from my blog post here). A consequence of the richness axiom is that we can define two different distance functions, $d_1$ (top left) and $d_2$ (bottom left), that respectively put all the data points into individual clusters and into some other clustering. Then we can d...
Clustering -- Intuition behind Kleinberg's Impossibility Theorem
This is the intuition I came up with (a snippet from my blog post here). A consequence of the richness axiom is that we can define two different distance functions, $d_1$ (top left) and $d_2$ (bottom
Clustering -- Intuition behind Kleinberg's Impossibility Theorem This is the intuition I came up with (a snippet from my blog post here). A consequence of the richness axiom is that we can define two different distance functions, $d_1$ (top left) and $d_2$ (bottom left), that respectively put all the data points into ...
Clustering -- Intuition behind Kleinberg's Impossibility Theorem This is the intuition I came up with (a snippet from my blog post here). A consequence of the richness axiom is that we can define two different distance functions, $d_1$ (top left) and $d_2$ (bottom
12,757
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
You need to consider the drift and (parametric/linear) trend in the levels of the time series in order to specify the deterministic terms in the augmented Dickey-Fuller regression which is in terms of the first differences of the time series. The confusion arises exactly from deriving the first-differences equation in ...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
You need to consider the drift and (parametric/linear) trend in the levels of the time series in order to specify the deterministic terms in the augmented Dickey-Fuller regression which is in terms of
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? You need to consider the drift and (parametric/linear) trend in the levels of the time series in order to specify the deterministic terms in the augmented Dickey-Fuller regression which is in terms of the first differences o...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? You need to consider the drift and (parametric/linear) trend in the levels of the time series in order to specify the deterministic terms in the augmented Dickey-Fuller regression which is in terms of
12,758
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
The null hypothesis in Dickey-Fuller test is that there is a unit root in a process. So when you reject the null, you get that your process is stationary (with the usual caveats of hypothesis testing). Concerning your math, the expresion $$\nabla y_t=\alpha_0+\alpha_1 t+\delta y_{t-1}+u_t$$ does not mean that $\nabla y...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
The null hypothesis in Dickey-Fuller test is that there is a unit root in a process. So when you reject the null, you get that your process is stationary (with the usual caveats of hypothesis testing)
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? The null hypothesis in Dickey-Fuller test is that there is a unit root in a process. So when you reject the null, you get that your process is stationary (with the usual caveats of hypothesis testing). Concerning your math, ...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? The null hypothesis in Dickey-Fuller test is that there is a unit root in a process. So when you reject the null, you get that your process is stationary (with the usual caveats of hypothesis testing)
12,759
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
Previous answers were excellent. You usually take the decision on which test to implement based on the plot. In this case, the data appears to have an intercept and trend. If you test for an Unit-Root in levels, you'll use an intercept and trend model. If you run the test in differences, you'll use just an intercept mo...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend?
Previous answers were excellent. You usually take the decision on which test to implement based on the plot. In this case, the data appears to have an intercept and trend. If you test for an Unit-Root
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? Previous answers were excellent. You usually take the decision on which test to implement based on the plot. In this case, the data appears to have an intercept and trend. If you test for an Unit-Root in levels, you'll use a...
Which Dickey-Fuller test for a time series modelled with an intercept/drift and a linear trend? Previous answers were excellent. You usually take the decision on which test to implement based on the plot. In this case, the data appears to have an intercept and trend. If you test for an Unit-Root
12,760
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure?
Why should it not be possible? The overall test and the pairwise tests ask different questions, so they can get different answers.
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce
Why should it not be possible? The overall test and the pairwise tests ask different questions, so they can get different answers.
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure? Why should it not be possible? The overall test and the pairwise tests ask different questions, so they can get different answers.
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce Why should it not be possible? The overall test and the pairwise tests ask different questions, so they can get different answers.
12,761
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure?
This is mainly due to the sensitivity of ANOVA (greater than the pairwise test sensitivity). Then, ANOVA detect lower variability around mean when pairwise test hardly distinguishes between the pair's mean. The analysis must focus on the differences, and you can be more flexible on the post-hoc analysis, having in mi...
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce
This is mainly due to the sensitivity of ANOVA (greater than the pairwise test sensitivity). Then, ANOVA detect lower variability around mean when pairwise test hardly distinguishes between the pair
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure? This is mainly due to the sensitivity of ANOVA (greater than the pairwise test sensitivity). Then, ANOVA detect lower variability around mean when pairwise test hardly distinguishes between the pair's mean. The a...
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce This is mainly due to the sensitivity of ANOVA (greater than the pairwise test sensitivity). Then, ANOVA detect lower variability around mean when pairwise test hardly distinguishes between the pair
12,762
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure?
Below is a copy from an answer to a duplicate question R Tukey HSD Anova: Anova significant, Tukey not? Since this answer is not visible here, and there is no clear link, I create this copy. The relationship between the p-values for the F-test and Tukey HSD test is not one-to-one. (even though both test, indirectly, e...
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce
Below is a copy from an answer to a duplicate question R Tukey HSD Anova: Anova significant, Tukey not? Since this answer is not visible here, and there is no clear link, I create this copy. The rela
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's procedure? Below is a copy from an answer to a duplicate question R Tukey HSD Anova: Anova significant, Tukey not? Since this answer is not visible here, and there is no clear link, I create this copy. The relationship betwe...
How can I get a significant overall ANOVA but no significant pairwise differences with Tukey's proce Below is a copy from an answer to a duplicate question R Tukey HSD Anova: Anova significant, Tukey not? Since this answer is not visible here, and there is no clear link, I create this copy. The rela
12,763
How does Naive Bayes work with continuous variables?
There are many ways to perform naive Bayes classification (NBC). A common technique in NBC is to recode the feature (variable) values into quartiles, such that values less than the 25th percentile are assigned a 1, 25th to 50th a 2, 50th to 75th a 3 and greater than the 75th percentile a 4. Thus a single object will ...
How does Naive Bayes work with continuous variables?
There are many ways to perform naive Bayes classification (NBC). A common technique in NBC is to recode the feature (variable) values into quartiles, such that values less than the 25th percentile ar
How does Naive Bayes work with continuous variables? There are many ways to perform naive Bayes classification (NBC). A common technique in NBC is to recode the feature (variable) values into quartiles, such that values less than the 25th percentile are assigned a 1, 25th to 50th a 2, 50th to 75th a 3 and greater than...
How does Naive Bayes work with continuous variables? There are many ways to perform naive Bayes classification (NBC). A common technique in NBC is to recode the feature (variable) values into quartiles, such that values less than the 25th percentile ar
12,764
How does Naive Bayes work with continuous variables?
The heart of Naive Bayes is the heroic conditional assumption: $$P(x \mid X, C) = P(x \mid C)$$ In no way must $x$ be discrete. For example, Gaussian Naive Bayes assumes each category $C$ has a different mean and variance: density $p(x \mid C = i) = \phi(\mu_i, \sigma^2_i)$. There are different ways to estimate the par...
How does Naive Bayes work with continuous variables?
The heart of Naive Bayes is the heroic conditional assumption: $$P(x \mid X, C) = P(x \mid C)$$ In no way must $x$ be discrete. For example, Gaussian Naive Bayes assumes each category $C$ has a differ
How does Naive Bayes work with continuous variables? The heart of Naive Bayes is the heroic conditional assumption: $$P(x \mid X, C) = P(x \mid C)$$ In no way must $x$ be discrete. For example, Gaussian Naive Bayes assumes each category $C$ has a different mean and variance: density $p(x \mid C = i) = \phi(\mu_i, \sigm...
How does Naive Bayes work with continuous variables? The heart of Naive Bayes is the heroic conditional assumption: $$P(x \mid X, C) = P(x \mid C)$$ In no way must $x$ be discrete. For example, Gaussian Naive Bayes assumes each category $C$ has a differ
12,765
Why does Ridge Regression work well in the presence of multicollinearity?
Consider the simple case of 2 predictor variables ($x_1$, $x_2$). If there is no or little colinearity and good spread in both predictors, then we are fitting a plane to the data ($y$ is the 3rd dimension) and there is often a very clear "best" plane. But with colinearity the relationship is really a line through 3 d...
Why does Ridge Regression work well in the presence of multicollinearity?
Consider the simple case of 2 predictor variables ($x_1$, $x_2$). If there is no or little colinearity and good spread in both predictors, then we are fitting a plane to the data ($y$ is the 3rd dime
Why does Ridge Regression work well in the presence of multicollinearity? Consider the simple case of 2 predictor variables ($x_1$, $x_2$). If there is no or little colinearity and good spread in both predictors, then we are fitting a plane to the data ($y$ is the 3rd dimension) and there is often a very clear "best" ...
Why does Ridge Regression work well in the presence of multicollinearity? Consider the simple case of 2 predictor variables ($x_1$, $x_2$). If there is no or little colinearity and good spread in both predictors, then we are fitting a plane to the data ($y$ is the 3rd dime
12,766
If p > n, the lasso selects at most n variables
As said, this is not a property of an algorithm but of the optimization problem. The KKT conditions basically give that for coefficient $\beta_j$ to be non-zero it has to correspond to a fixed correlation with the residual $|X_j^t(y-X\beta)| = \lambda$ ($\lambda$ is the regularization parameter). After resolving the va...
If p > n, the lasso selects at most n variables
As said, this is not a property of an algorithm but of the optimization problem. The KKT conditions basically give that for coefficient $\beta_j$ to be non-zero it has to correspond to a fixed correla
If p > n, the lasso selects at most n variables As said, this is not a property of an algorithm but of the optimization problem. The KKT conditions basically give that for coefficient $\beta_j$ to be non-zero it has to correspond to a fixed correlation with the residual $|X_j^t(y-X\beta)| = \lambda$ ($\lambda$ is the r...
If p > n, the lasso selects at most n variables As said, this is not a property of an algorithm but of the optimization problem. The KKT conditions basically give that for coefficient $\beta_j$ to be non-zero it has to correspond to a fixed correla
12,767
If p > n, the lasso selects at most n variables
Another explanation is the following: if $n < p$, the rank of the data matrix $X$ is at most $n$, so the dimension of its (right) null space is at least $p - n$. Write any vector in this null space as $z$. Then at any feasible point $\beta$, one can always move in this $p - n$-dimensional null space towards the coordi...
If p > n, the lasso selects at most n variables
Another explanation is the following: if $n < p$, the rank of the data matrix $X$ is at most $n$, so the dimension of its (right) null space is at least $p - n$. Write any vector in this null space a
If p > n, the lasso selects at most n variables Another explanation is the following: if $n < p$, the rank of the data matrix $X$ is at most $n$, so the dimension of its (right) null space is at least $p - n$. Write any vector in this null space as $z$. Then at any feasible point $\beta$, one can always move in this $...
If p > n, the lasso selects at most n variables Another explanation is the following: if $n < p$, the rank of the data matrix $X$ is at most $n$, so the dimension of its (right) null space is at least $p - n$. Write any vector in this null space a
12,768
An unbiased estimate of the median
Such an estimator does not exist. The intuition is that the median can stay fixed while we freely shift probability density around on both sides of it, so that any estimator whose average value is the median for one distribution will have a different average for the altered distribution, making it biased. The followin...
An unbiased estimate of the median
Such an estimator does not exist. The intuition is that the median can stay fixed while we freely shift probability density around on both sides of it, so that any estimator whose average value is the
An unbiased estimate of the median Such an estimator does not exist. The intuition is that the median can stay fixed while we freely shift probability density around on both sides of it, so that any estimator whose average value is the median for one distribution will have a different average for the altered distributi...
An unbiased estimate of the median Such an estimator does not exist. The intuition is that the median can stay fixed while we freely shift probability density around on both sides of it, so that any estimator whose average value is the
12,769
An unbiased estimate of the median
Finding an unbiased estimator without having a parametric model would be difficult! But you could use bootstrapping, and use that to correct the empirical median to get an approximately unbiased estimator.
An unbiased estimate of the median
Finding an unbiased estimator without having a parametric model would be difficult! But you could use bootstrapping, and use that to correct the empirical median to get an approximately unbiased esti
An unbiased estimate of the median Finding an unbiased estimator without having a parametric model would be difficult! But you could use bootstrapping, and use that to correct the empirical median to get an approximately unbiased estimator.
An unbiased estimate of the median Finding an unbiased estimator without having a parametric model would be difficult! But you could use bootstrapping, and use that to correct the empirical median to get an approximately unbiased esti
12,770
An unbiased estimate of the median
I believe quantile regression will give you a consistent estimator of the median. Given the model $Y = \alpha + u$. And you want to estimate $\text{med}(y) = \text{med}(\alpha + u) = \alpha + \text{med}(u)$ since $\alpha$ is a constant. All you need is the $\text{med}(u) = 0$ which should be true so long as you have...
An unbiased estimate of the median
I believe quantile regression will give you a consistent estimator of the median. Given the model $Y = \alpha + u$. And you want to estimate $\text{med}(y) = \text{med}(\alpha + u) = \alpha + \text{
An unbiased estimate of the median I believe quantile regression will give you a consistent estimator of the median. Given the model $Y = \alpha + u$. And you want to estimate $\text{med}(y) = \text{med}(\alpha + u) = \alpha + \text{med}(u)$ since $\alpha$ is a constant. All you need is the $\text{med}(u) = 0$ which...
An unbiased estimate of the median I believe quantile regression will give you a consistent estimator of the median. Given the model $Y = \alpha + u$. And you want to estimate $\text{med}(y) = \text{med}(\alpha + u) = \alpha + \text{
12,771
An unbiased estimate of the median
The average is not the exclusive statistic that can be used to measure the central tendency of the bias of an estimator, and by restricting yourself to the average the problem ends up being the equivalent of saying that the average does not equal the median. Take n=1 (just sample populations consisting of a single samp...
An unbiased estimate of the median
The average is not the exclusive statistic that can be used to measure the central tendency of the bias of an estimator, and by restricting yourself to the average the problem ends up being the equiva
An unbiased estimate of the median The average is not the exclusive statistic that can be used to measure the central tendency of the bias of an estimator, and by restricting yourself to the average the problem ends up being the equivalent of saying that the average does not equal the median. Take n=1 (just sample popu...
An unbiased estimate of the median The average is not the exclusive statistic that can be used to measure the central tendency of the bias of an estimator, and by restricting yourself to the average the problem ends up being the equiva
12,772
Paired t-test as a special case of linear mixed-effect modeling
The equivalence of the models can be observed by calculating the correlation between two observations from the same individual, as follows: As in your notation, let $Y_{ij} = \mu + \alpha_i + \beta_j + \epsilon_{ij}$, where $\beta_j \sim N(0, \sigma_p^2)$ and $\epsilon_{ij} \sim N(0, \sigma^2)$. Then $Cov(y_{ik}, y_{j...
Paired t-test as a special case of linear mixed-effect modeling
The equivalence of the models can be observed by calculating the correlation between two observations from the same individual, as follows: As in your notation, let $Y_{ij} = \mu + \alpha_i + \beta_j
Paired t-test as a special case of linear mixed-effect modeling The equivalence of the models can be observed by calculating the correlation between two observations from the same individual, as follows: As in your notation, let $Y_{ij} = \mu + \alpha_i + \beta_j + \epsilon_{ij}$, where $\beta_j \sim N(0, \sigma_p^2)$ ...
Paired t-test as a special case of linear mixed-effect modeling The equivalence of the models can be observed by calculating the correlation between two observations from the same individual, as follows: As in your notation, let $Y_{ij} = \mu + \alpha_i + \beta_j
12,773
Paired t-test as a special case of linear mixed-effect modeling
You might also consider using function mixed in package afex to return p values with Kenward-Roger df approximation, which returns identical p values as a paired t test: library(afex) mixed(y ~ x + (1|subj), type=3,method="KR",data=myDat) Or library(lmerTest) options(contrasts=c('contr.sum', 'contr.poly')) anova(lme...
Paired t-test as a special case of linear mixed-effect modeling
You might also consider using function mixed in package afex to return p values with Kenward-Roger df approximation, which returns identical p values as a paired t test: library(afex) mixed(y ~ x + (1
Paired t-test as a special case of linear mixed-effect modeling You might also consider using function mixed in package afex to return p values with Kenward-Roger df approximation, which returns identical p values as a paired t test: library(afex) mixed(y ~ x + (1|subj), type=3,method="KR",data=myDat) Or library(lme...
Paired t-test as a special case of linear mixed-effect modeling You might also consider using function mixed in package afex to return p values with Kenward-Roger df approximation, which returns identical p values as a paired t test: library(afex) mixed(y ~ x + (1
12,774
What is the difference between logistic regression and Fractional response regression?
If your question is: what is the difference between these two codes? A look at ?glm says See family for details of family functions, and a look at ?family reveals the following description: The quasibinomial and quasipoisson families differ from the binomial and poisson families only in that the dispersion parameter...
What is the difference between logistic regression and Fractional response regression?
If your question is: what is the difference between these two codes? A look at ?glm says See family for details of family functions, and a look at ?family reveals the following description: The quasi
What is the difference between logistic regression and Fractional response regression? If your question is: what is the difference between these two codes? A look at ?glm says See family for details of family functions, and a look at ?family reveals the following description: The quasibinomial and quasipoisson familie...
What is the difference between logistic regression and Fractional response regression? If your question is: what is the difference between these two codes? A look at ?glm says See family for details of family functions, and a look at ?family reveals the following description: The quasi
12,775
How to summarize credible intervals for a medical audience
Quick thoughts: 1) The key issue is what applied question you are trying to answer for your audience, because that determines what information you want from your statistical analysis. In this case, it seems to me that you want to estimate the magnitude of differences between groups (or perhaps the magnitude of ratios ...
How to summarize credible intervals for a medical audience
Quick thoughts: 1) The key issue is what applied question you are trying to answer for your audience, because that determines what information you want from your statistical analysis. In this case, i
How to summarize credible intervals for a medical audience Quick thoughts: 1) The key issue is what applied question you are trying to answer for your audience, because that determines what information you want from your statistical analysis. In this case, it seems to me that you want to estimate the magnitude of diff...
How to summarize credible intervals for a medical audience Quick thoughts: 1) The key issue is what applied question you are trying to answer for your audience, because that determines what information you want from your statistical analysis. In this case, i
12,776
How to summarize credible intervals for a medical audience
Following SO etiquette, this should have been written as a comment to @John K. Kruschke, but longer comments are difficult to structure. Sorry. @John K. Kruschke writes: Merely by post-processing of the completed MCMC chain... lower_CredI and upper_CredI in the original post were computed as you mentioned from the fu...
How to summarize credible intervals for a medical audience
Following SO etiquette, this should have been written as a comment to @John K. Kruschke, but longer comments are difficult to structure. Sorry. @John K. Kruschke writes: Merely by post-processing of
How to summarize credible intervals for a medical audience Following SO etiquette, this should have been written as a comment to @John K. Kruschke, but longer comments are difficult to structure. Sorry. @John K. Kruschke writes: Merely by post-processing of the completed MCMC chain... lower_CredI and upper_CredI in t...
How to summarize credible intervals for a medical audience Following SO etiquette, this should have been written as a comment to @John K. Kruschke, but longer comments are difficult to structure. Sorry. @John K. Kruschke writes: Merely by post-processing of
12,777
How to keep exploratory analyses of large datasets in check?
I think that frequently, the tendency to feel like you've gone down a rabbit hole with exploratory analyses is due to losing sight of the substantive question(s) you're asking. I do it myself, occasionally, and then have to remind myself what my goal(s) are. For example, am I trying to build a specific model, or evalua...
How to keep exploratory analyses of large datasets in check?
I think that frequently, the tendency to feel like you've gone down a rabbit hole with exploratory analyses is due to losing sight of the substantive question(s) you're asking. I do it myself, occasio
How to keep exploratory analyses of large datasets in check? I think that frequently, the tendency to feel like you've gone down a rabbit hole with exploratory analyses is due to losing sight of the substantive question(s) you're asking. I do it myself, occasionally, and then have to remind myself what my goal(s) are. ...
How to keep exploratory analyses of large datasets in check? I think that frequently, the tendency to feel like you've gone down a rabbit hole with exploratory analyses is due to losing sight of the substantive question(s) you're asking. I do it myself, occasio
12,778
How to keep exploratory analyses of large datasets in check?
I don't know how helpful a general answer will be. You're asking how to do something difficult; good answers will probably depend on the discipline and will probably be long and nuanced. :) As far as organization goes, you're already using git, so next you should start using a makefile to execute the analysis. The make...
How to keep exploratory analyses of large datasets in check?
I don't know how helpful a general answer will be. You're asking how to do something difficult; good answers will probably depend on the discipline and will probably be long and nuanced. :) As far as
How to keep exploratory analyses of large datasets in check? I don't know how helpful a general answer will be. You're asking how to do something difficult; good answers will probably depend on the discipline and will probably be long and nuanced. :) As far as organization goes, you're already using git, so next you sh...
How to keep exploratory analyses of large datasets in check? I don't know how helpful a general answer will be. You're asking how to do something difficult; good answers will probably depend on the discipline and will probably be long and nuanced. :) As far as
12,779
How to keep exploratory analyses of large datasets in check?
Two words: concept map. That's the only effective way I have found to divide and conquer large data sets or any concept that's really convoluted. http://en.wikipedia.org/wiki/Concept_maps Personally, I think better on paper than on screen, so I just mind map what I'm dealing with before I even start to do any basic ana...
How to keep exploratory analyses of large datasets in check?
Two words: concept map. That's the only effective way I have found to divide and conquer large data sets or any concept that's really convoluted. http://en.wikipedia.org/wiki/Concept_maps Personally,
How to keep exploratory analyses of large datasets in check? Two words: concept map. That's the only effective way I have found to divide and conquer large data sets or any concept that's really convoluted. http://en.wikipedia.org/wiki/Concept_maps Personally, I think better on paper than on screen, so I just mind map ...
How to keep exploratory analyses of large datasets in check? Two words: concept map. That's the only effective way I have found to divide and conquer large data sets or any concept that's really convoluted. http://en.wikipedia.org/wiki/Concept_maps Personally,
12,780
How to keep exploratory analyses of large datasets in check?
You're already using git: why not use version control to organize your exploration? Create a new branch for each new "branch" of your exploration, and fork off branches for different versions of plots as well. This method will make it slightly more difficult to combine your end results, but you could always maintain an...
How to keep exploratory analyses of large datasets in check?
You're already using git: why not use version control to organize your exploration? Create a new branch for each new "branch" of your exploration, and fork off branches for different versions of plots
How to keep exploratory analyses of large datasets in check? You're already using git: why not use version control to organize your exploration? Create a new branch for each new "branch" of your exploration, and fork off branches for different versions of plots as well. This method will make it slightly more difficult ...
How to keep exploratory analyses of large datasets in check? You're already using git: why not use version control to organize your exploration? Create a new branch for each new "branch" of your exploration, and fork off branches for different versions of plots
12,781
How to keep exploratory analyses of large datasets in check?
I would look into Business Intelligence tools... where similar issues arise. In particular (data warehouses, dimensional analysis,) hierarchies and drill downs. The basic idea is that you try to represent your underlying data as aggregatable quantities ( counts, earnings etc rather than eg percentages). Then you desi...
How to keep exploratory analyses of large datasets in check?
I would look into Business Intelligence tools... where similar issues arise. In particular (data warehouses, dimensional analysis,) hierarchies and drill downs. The basic idea is that you try to repr
How to keep exploratory analyses of large datasets in check? I would look into Business Intelligence tools... where similar issues arise. In particular (data warehouses, dimensional analysis,) hierarchies and drill downs. The basic idea is that you try to represent your underlying data as aggregatable quantities ( cou...
How to keep exploratory analyses of large datasets in check? I would look into Business Intelligence tools... where similar issues arise. In particular (data warehouses, dimensional analysis,) hierarchies and drill downs. The basic idea is that you try to repr
12,782
Model stability when dealing with large $p$, small $n$ problem
"Sparse Algorithms are not Stable: A No-free-lunch Theorem" I guess the title says a lot, as you pointed out. [...] a sparse algorithm can have non-unique optimal solutions, and is therefore ill-posed Check out randomized lasso, and the talk by Peter Buhlmann. Update: I found this paper easier to follow than the p...
Model stability when dealing with large $p$, small $n$ problem
"Sparse Algorithms are not Stable: A No-free-lunch Theorem" I guess the title says a lot, as you pointed out. [...] a sparse algorithm can have non-unique optimal solutions, and is therefore ill-p
Model stability when dealing with large $p$, small $n$ problem "Sparse Algorithms are not Stable: A No-free-lunch Theorem" I guess the title says a lot, as you pointed out. [...] a sparse algorithm can have non-unique optimal solutions, and is therefore ill-posed Check out randomized lasso, and the talk by Peter B...
Model stability when dealing with large $p$, small $n$ problem "Sparse Algorithms are not Stable: A No-free-lunch Theorem" I guess the title says a lot, as you pointed out. [...] a sparse algorithm can have non-unique optimal solutions, and is therefore ill-p
12,783
Model stability when dealing with large $p$, small $n$ problem
My current approach is to find best tuning parameters (lambda and alpha) in a grid search on 90% of the dataset with 10-fold cross-validation averaging MSE score. Then I train the model with the best tuning parameters on the whole 90% of dataset. I am able to evaluate my model using R squared on the holdout 10% of the ...
Model stability when dealing with large $p$, small $n$ problem
My current approach is to find best tuning parameters (lambda and alpha) in a grid search on 90% of the dataset with 10-fold cross-validation averaging MSE score. Then I train the model with the best
Model stability when dealing with large $p$, small $n$ problem My current approach is to find best tuning parameters (lambda and alpha) in a grid search on 90% of the dataset with 10-fold cross-validation averaging MSE score. Then I train the model with the best tuning parameters on the whole 90% of dataset. I am able ...
Model stability when dealing with large $p$, small $n$ problem My current approach is to find best tuning parameters (lambda and alpha) in a grid search on 90% of the dataset with 10-fold cross-validation averaging MSE score. Then I train the model with the best
12,784
Model stability when dealing with large $p$, small $n$ problem
There's no way out of it. As some said, models are unstable by nature (otherwise statistics would not be needed). But instability itself brings information. So instead of trying to get rid of it I tried to analyze it. I run cross validation simulations many times and then get the coefficients for the best selected par...
Model stability when dealing with large $p$, small $n$ problem
There's no way out of it. As some said, models are unstable by nature (otherwise statistics would not be needed). But instability itself brings information. So instead of trying to get rid of it I tr
Model stability when dealing with large $p$, small $n$ problem There's no way out of it. As some said, models are unstable by nature (otherwise statistics would not be needed). But instability itself brings information. So instead of trying to get rid of it I tried to analyze it. I run cross validation simulations man...
Model stability when dealing with large $p$, small $n$ problem There's no way out of it. As some said, models are unstable by nature (otherwise statistics would not be needed). But instability itself brings information. So instead of trying to get rid of it I tr
12,785
Relationship between gamma and chi-squared distribution
Some background The $\chi^2_n$ distribution is defined as the distribution that results from summing the squares of $n$ independent random variables $\mathcal{N}(0,1)$, so: $$\text{If }X_1,\ldots,X_n\sim\mathcal{N}(0,1)\text{ and are independent, then }Y_1=\sum_{i=1}^nX_i^2\sim \chi^2_n,$$ where $X\sim Y$ denotes that ...
Relationship between gamma and chi-squared distribution
Some background The $\chi^2_n$ distribution is defined as the distribution that results from summing the squares of $n$ independent random variables $\mathcal{N}(0,1)$, so: $$\text{If }X_1,\ldots,X_n\
Relationship between gamma and chi-squared distribution Some background The $\chi^2_n$ distribution is defined as the distribution that results from summing the squares of $n$ independent random variables $\mathcal{N}(0,1)$, so: $$\text{If }X_1,\ldots,X_n\sim\mathcal{N}(0,1)\text{ and are independent, then }Y_1=\sum_{i...
Relationship between gamma and chi-squared distribution Some background The $\chi^2_n$ distribution is defined as the distribution that results from summing the squares of $n$ independent random variables $\mathcal{N}(0,1)$, so: $$\text{If }X_1,\ldots,X_n\
12,786
Capturing seasonality in multiple regression for daily data
@Irishstat covered pretty much what I was about to say, but I would respond with my own personal experience in modeling these data with time series regression and OLS regression. If it is a daily data then I would do the following: Create a dummy variable for different seasonality: To capture day of the week seasonali...
Capturing seasonality in multiple regression for daily data
@Irishstat covered pretty much what I was about to say, but I would respond with my own personal experience in modeling these data with time series regression and OLS regression. If it is a daily data
Capturing seasonality in multiple regression for daily data @Irishstat covered pretty much what I was about to say, but I would respond with my own personal experience in modeling these data with time series regression and OLS regression. If it is a daily data then I would do the following: Create a dummy variable for ...
Capturing seasonality in multiple regression for daily data @Irishstat covered pretty much what I was about to say, but I would respond with my own personal experience in modeling these data with time series regression and OLS regression. If it is a daily data
12,787
Capturing seasonality in multiple regression for daily data
What you need is a model that will incorporate daily effects, weekly effects, monthly effects,week of the month effects, day-of-the-month effects,lead and lag effects of the holidays, unspecified but empirically identifiable level/step shifts , local time trends, changes in seasonal pulses and pulses while incorporatin...
Capturing seasonality in multiple regression for daily data
What you need is a model that will incorporate daily effects, weekly effects, monthly effects,week of the month effects, day-of-the-month effects,lead and lag effects of the holidays, unspecified but
Capturing seasonality in multiple regression for daily data What you need is a model that will incorporate daily effects, weekly effects, monthly effects,week of the month effects, day-of-the-month effects,lead and lag effects of the holidays, unspecified but empirically identifiable level/step shifts , local time tren...
Capturing seasonality in multiple regression for daily data What you need is a model that will incorporate daily effects, weekly effects, monthly effects,week of the month effects, day-of-the-month effects,lead and lag effects of the holidays, unspecified but
12,788
libsvm "reaching max number of iterations" warning and cross-validation
This warning means that the iterative routine used by LIBSVM to solve quadratic optimization problem in order to find the maximum margin hyperplane (i.e., parameters $w$ and $b$) separating your data reached the maximum number of iterations and will have to stop, while the current approximation for $w$ can be further e...
libsvm "reaching max number of iterations" warning and cross-validation
This warning means that the iterative routine used by LIBSVM to solve quadratic optimization problem in order to find the maximum margin hyperplane (i.e., parameters $w$ and $b$) separating your data
libsvm "reaching max number of iterations" warning and cross-validation This warning means that the iterative routine used by LIBSVM to solve quadratic optimization problem in order to find the maximum margin hyperplane (i.e., parameters $w$ and $b$) separating your data reached the maximum number of iterations and wil...
libsvm "reaching max number of iterations" warning and cross-validation This warning means that the iterative routine used by LIBSVM to solve quadratic optimization problem in order to find the maximum margin hyperplane (i.e., parameters $w$ and $b$) separating your data
12,789
What does (pandas) autocorrelation graph show?
Looking at the estimator for the autocovariance function at lag $ h $ might be useful (note that the autocorrelation function is simply a scaled-down version of the autocovariance function). $$ \hat{\gamma}(h) = \frac{1}{n} \sum_{t=1}^{n-\mid h \mid} (x_{t+h} - \bar{x})(x_t - \bar{x}) $$ The idea is that, for each lag ...
What does (pandas) autocorrelation graph show?
Looking at the estimator for the autocovariance function at lag $ h $ might be useful (note that the autocorrelation function is simply a scaled-down version of the autocovariance function). $$ \hat{\
What does (pandas) autocorrelation graph show? Looking at the estimator for the autocovariance function at lag $ h $ might be useful (note that the autocorrelation function is simply a scaled-down version of the autocovariance function). $$ \hat{\gamma}(h) = \frac{1}{n} \sum_{t=1}^{n-\mid h \mid} (x_{t+h} - \bar{x})(x_...
What does (pandas) autocorrelation graph show? Looking at the estimator for the autocovariance function at lag $ h $ might be useful (note that the autocorrelation function is simply a scaled-down version of the autocovariance function). $$ \hat{\
12,790
Is Random Forest suitable for very small data sets?
Random forest is basically bootstrap resampling and training decision trees on the samples, so the answer to your question needs to address those two. Bootstrap resampling is not a cure for small samples. If you have just twenty four observations in your dataset, then each of the samples taken with replacement from thi...
Is Random Forest suitable for very small data sets?
Random forest is basically bootstrap resampling and training decision trees on the samples, so the answer to your question needs to address those two. Bootstrap resampling is not a cure for small samp
Is Random Forest suitable for very small data sets? Random forest is basically bootstrap resampling and training decision trees on the samples, so the answer to your question needs to address those two. Bootstrap resampling is not a cure for small samples. If you have just twenty four observations in your dataset, then...
Is Random Forest suitable for very small data sets? Random forest is basically bootstrap resampling and training decision trees on the samples, so the answer to your question needs to address those two. Bootstrap resampling is not a cure for small samp
12,791
Is Random Forest suitable for very small data sets?
On the one hand, this is a small data set, and random forest is data-hungry. On the other hand, maybe something is better than nothing. There's nothing more to say than "Try it and see." You get to decide whether or not any particular model is "good;" moreover, we can't tell you whether any model is fit for a particul...
Is Random Forest suitable for very small data sets?
On the one hand, this is a small data set, and random forest is data-hungry. On the other hand, maybe something is better than nothing. There's nothing more to say than "Try it and see." You get to d
Is Random Forest suitable for very small data sets? On the one hand, this is a small data set, and random forest is data-hungry. On the other hand, maybe something is better than nothing. There's nothing more to say than "Try it and see." You get to decide whether or not any particular model is "good;" moreover, we ca...
Is Random Forest suitable for very small data sets? On the one hand, this is a small data set, and random forest is data-hungry. On the other hand, maybe something is better than nothing. There's nothing more to say than "Try it and see." You get to d
12,792
Ordinal logistic regression in Python
statsmodels now supports Ordinal Regression: from statsmodels.miscmodels.ordinal_model import OrderedModel see their documentation here
Ordinal logistic regression in Python
statsmodels now supports Ordinal Regression: from statsmodels.miscmodels.ordinal_model import OrderedModel see their documentation here
Ordinal logistic regression in Python statsmodels now supports Ordinal Regression: from statsmodels.miscmodels.ordinal_model import OrderedModel see their documentation here
Ordinal logistic regression in Python statsmodels now supports Ordinal Regression: from statsmodels.miscmodels.ordinal_model import OrderedModel see their documentation here
12,793
Ordinal logistic regression in Python
Have you tried Mord? It seems there are very few packages to do the same, and it is one of them; though, as Fabian himself suspects, code may not scale properly. Source: Logistic ordinal regression in Python
Ordinal logistic regression in Python
Have you tried Mord? It seems there are very few packages to do the same, and it is one of them; though, as Fabian himself suspects, code may not scale properly. Source: Logistic ordinal regression in
Ordinal logistic regression in Python Have you tried Mord? It seems there are very few packages to do the same, and it is one of them; though, as Fabian himself suspects, code may not scale properly. Source: Logistic ordinal regression in Python
Ordinal logistic regression in Python Have you tried Mord? It seems there are very few packages to do the same, and it is one of them; though, as Fabian himself suspects, code may not scale properly. Source: Logistic ordinal regression in
12,794
How can recurrent neural networks be used for sequence classification?
One can use RNN to map multiple input to a single input (label), as this give figure (source) illustrates: Each rectangle is a vector and arrows represent functions (e.g. matrix multiply). Input vectors are in red, output vectors are in blue and green vectors hold the RNN's state (more on this soon). From left to rig...
How can recurrent neural networks be used for sequence classification?
One can use RNN to map multiple input to a single input (label), as this give figure (source) illustrates: Each rectangle is a vector and arrows represent functions (e.g. matrix multiply). Input vec
How can recurrent neural networks be used for sequence classification? One can use RNN to map multiple input to a single input (label), as this give figure (source) illustrates: Each rectangle is a vector and arrows represent functions (e.g. matrix multiply). Input vectors are in red, output vectors are in blue and g...
How can recurrent neural networks be used for sequence classification? One can use RNN to map multiple input to a single input (label), as this give figure (source) illustrates: Each rectangle is a vector and arrows represent functions (e.g. matrix multiply). Input vec
12,795
How can recurrent neural networks be used for sequence classification?
In case of simple RNN, feed entire sequence to your network and then output class label at the last sequence element (see this paper and references there for early example of this approach). In training phase we can backpropogate error in time from last sequence element to the start of the sequence. In general this is ...
How can recurrent neural networks be used for sequence classification?
In case of simple RNN, feed entire sequence to your network and then output class label at the last sequence element (see this paper and references there for early example of this approach). In traini
How can recurrent neural networks be used for sequence classification? In case of simple RNN, feed entire sequence to your network and then output class label at the last sequence element (see this paper and references there for early example of this approach). In training phase we can backpropogate error in time from ...
How can recurrent neural networks be used for sequence classification? In case of simple RNN, feed entire sequence to your network and then output class label at the last sequence element (see this paper and references there for early example of this approach). In traini
12,796
EM algorithm manually implemented
You have several problems in the source code: As @Pat pointed out, you should not use log(dnorm()) as this value can easily go to infinity. You should use logmvdnorm When you use sum, be aware to remove infinite or missing values You looping variable k is wrong, you should update loglik[k+1] but you update loglik[k] T...
EM algorithm manually implemented
You have several problems in the source code: As @Pat pointed out, you should not use log(dnorm()) as this value can easily go to infinity. You should use logmvdnorm When you use sum, be aware to rem
EM algorithm manually implemented You have several problems in the source code: As @Pat pointed out, you should not use log(dnorm()) as this value can easily go to infinity. You should use logmvdnorm When you use sum, be aware to remove infinite or missing values You looping variable k is wrong, you should update logl...
EM algorithm manually implemented You have several problems in the source code: As @Pat pointed out, you should not use log(dnorm()) as this value can easily go to infinity. You should use logmvdnorm When you use sum, be aware to rem
12,797
EM algorithm manually implemented
I keep getting an error when trying to open your .rar file, but that may just be me doing something silly. I cna see no obvious errors in your code. A possible reason you're getting zeros is due to floating point precision. Remember, when you calculate $f(y;\theta)$, you're evaluating $\exp(-0.5(y-\mu)^2/\sigma^2)$. It...
EM algorithm manually implemented
I keep getting an error when trying to open your .rar file, but that may just be me doing something silly. I cna see no obvious errors in your code. A possible reason you're getting zeros is due to fl
EM algorithm manually implemented I keep getting an error when trying to open your .rar file, but that may just be me doing something silly. I cna see no obvious errors in your code. A possible reason you're getting zeros is due to floating point precision. Remember, when you calculate $f(y;\theta)$, you're evaluating ...
EM algorithm manually implemented I keep getting an error when trying to open your .rar file, but that may just be me doing something silly. I cna see no obvious errors in your code. A possible reason you're getting zeros is due to fl
12,798
If the likelihood principle clashes with frequentist probability then do we discard one of them?
The part of the Frequentist approach that clashes with the likelihood principle is the theory of statistical testing (and p-value computation). It is usually highlighted by the following example. Suppose two Frequentist want to study a biased coin, which turns 'heads' with unknown propability $p$. They suspect that it ...
If the likelihood principle clashes with frequentist probability then do we discard one of them?
The part of the Frequentist approach that clashes with the likelihood principle is the theory of statistical testing (and p-value computation). It is usually highlighted by the following example. Supp
If the likelihood principle clashes with frequentist probability then do we discard one of them? The part of the Frequentist approach that clashes with the likelihood principle is the theory of statistical testing (and p-value computation). It is usually highlighted by the following example. Suppose two Frequentist wan...
If the likelihood principle clashes with frequentist probability then do we discard one of them? The part of the Frequentist approach that clashes with the likelihood principle is the theory of statistical testing (and p-value computation). It is usually highlighted by the following example. Supp
12,799
If the likelihood principle clashes with frequentist probability then do we discard one of them?
I like the example by @gui11aume (+1), but it can make an impression that the difference in two $p$-values arises only due to the different stopping rules used by the two experimenters. In fact, I believe it is a much more general phenomenon. Consider the second experimenter in @gui11aume's answer: the one who throws a...
If the likelihood principle clashes with frequentist probability then do we discard one of them?
I like the example by @gui11aume (+1), but it can make an impression that the difference in two $p$-values arises only due to the different stopping rules used by the two experimenters. In fact, I bel
If the likelihood principle clashes with frequentist probability then do we discard one of them? I like the example by @gui11aume (+1), but it can make an impression that the difference in two $p$-values arises only due to the different stopping rules used by the two experimenters. In fact, I believe it is a much more ...
If the likelihood principle clashes with frequentist probability then do we discard one of them? I like the example by @gui11aume (+1), but it can make an impression that the difference in two $p$-values arises only due to the different stopping rules used by the two experimenters. In fact, I bel
12,800
How does a random kitchen sink work?
Random kitchen sinks (or random Fourier features) and other related methods don't endeavour to perform inference but rather they try to reduce the bottleneck of kernel based inference methods. Kernel methods are great in many settings but they usually rely on the manipulation of matrices, for example solving linear sys...
How does a random kitchen sink work?
Random kitchen sinks (or random Fourier features) and other related methods don't endeavour to perform inference but rather they try to reduce the bottleneck of kernel based inference methods. Kernel
How does a random kitchen sink work? Random kitchen sinks (or random Fourier features) and other related methods don't endeavour to perform inference but rather they try to reduce the bottleneck of kernel based inference methods. Kernel methods are great in many settings but they usually rely on the manipulation of mat...
How does a random kitchen sink work? Random kitchen sinks (or random Fourier features) and other related methods don't endeavour to perform inference but rather they try to reduce the bottleneck of kernel based inference methods. Kernel