12,472 reputation
42046
bio website
location England
age
visits member for 2 years, 2 months
seen 27 mins ago

3h
revised Training with the full dataset after cross-validation?
fixed typos
4h
comment Using LASSO for variable selection, then using Logit
@Sven: "column of ones" - hopefully there's also a way to tell Stata not to shrink the intercept if you do that.
4h
comment How to use LASSO to select glm model gaussian
Alternatives include regularization - e.g. the LASSO the question is about - , model averaging, & data reduction carried out on the predictors prior to fitting.
9h
comment How to use LASSO to select glm model gaussian
@Daniel: Thats the point. You'd expect that when you fit 256 models & calculate the cross-validated residual error for each, the cross-validated residual error of the model with the lowest is an underestimate of what you'll see out-of-sample. Read gung's answer in the linked thread carefully.
1d
comment How to use LASSO to select glm model gaussian
What is your question exactly, apart from "How do I use glmnet?", which I think is explained very well in that tutorial from one of its authors (& too broad for CV)? If you don't know much about how the elastic net works, the books ISL & ESL are excellent & free.
1d
comment How to use LASSO to select glm model gaussian
Picking the model with the lowest AIC from all 256(!) hardly protects against overfitting - any more than picking the model with lowest cross-validated residual error would. See here.
1d
comment How to use LASSO to select glm model gaussian
See web.stanford.edu/~hastie/glmnet/glmnet_alpha.html for an intro to glmnet. You can use cross-validation to pick which value of the tuning parameter to use.
1d
comment Why is there no intercept in the lars output for LASSO in Stata?
Note that centering both response & predictors is usual in LASSO because it puts the intercept - which you don't want to shrink - to zero before fitting. R's lars package does this by default, storing the response & predictor sample means (as well as the $L_2$-norms used for scaling) so that you can recover the intercept (by extracting them & calculating it, or by using @Dimitriy's neat predict method). I'm not familiar with Stata, but you should be able to recover the intercept by manual calculation at least.
1d
comment Using LASSO for variable selection, then using Logit
Googling for stata lasso logistic gives me homepages.ucl.ac.uk/~ucakgam/stata.html as the first result.
1d
answered Using LASSO for variable selection, then using Logit
1d
comment Using LASSO for variable selection, then using Logit
(+1) There's doubtless a Stata package for this too - Statalist would be the best place to ask.
1d
reviewed Close Problem in sum of vector
2d
comment Using LASSO for variable selection, then using Logit
And that LASSO shrinks as well as selecting, which you'd be undoing.
2d
comment Using LASSO for variable selection, then using Logit
You're overlooking that you can use LASSO's L1-norm penalty in logistic regression just as in linear regression.
2d
comment Best method for short time-series
Whatever assumptions you make - concerning seasonality, stationarity, &c. - a short time series will give you the chance to detect only the most flagrant violations; so assumptions should be well-founded in domain knowledge. Do you need to model or just to make forecasts? The M3 competition compared various "automatic" forecasting methods on series from a variety of domains, some as short as 20.
2d
comment Is a model including a square root of a variable linear in the parameters?
In any case, the concept of "linear in the parameters" is explained here, here, here, here, here, & here.
2d
comment Is a model including a square root of a variable linear in the parameters?
@StatsStudent: Homework or not, we need to be told what the free parameters are, especially as the model is unidentifiable as it stands.
2d
comment Is representativeness a necessary condition for generalisability?
No - but it means that the generalization is justified only by domain knowledge, not by statistics.
2d
answered Significance of continous variables
2d
comment What is the difference between NaN and NA?
Welcome to CV! Thanks for answering, but do please read existing answers first, & consider whether you're adding anything new.