# lasso vs linear regression comparison

I have a data set with more features than observations, i.e. $p>n$. Using Lasso regression with glmnet, the optimal selection of $\lambda$ from cross-validation selects $p=8$ non-zero feature coefficients. I am trying to check predictive accuracy of the resulting model. I am use $k$-fold cross validation. Incidentally this is also point where BIC is lowest. Adjusted R^2 is about 80%. I am trying to analyse residuals(r).

• Does your data have a spatial or temporal element that's potentially causing autocorrelation in the residuals? – dcl May 3 '18 at 3:33
• Are you building a model for prediction? If so, issues of residual normality and p-values are not relevent. – Matthew Drury May 3 '18 at 3:44
• @MatthewDrury can you kindly elaborate on this? – itthrill May 3 '18 at 4:09
• There's a lot of information on this site, but the sort answer is this: those assumptions are there to support certain types of analysis using a linear model. p-values are to test the hypothesis that the coefficient is zero in a correctly specified model, and the normal assumption is there to ensure that the p-values reported are correct in this circumstance. If you are not using the model to test hypothesis that the parameters themselves are zero, then both these concerns are irrelevent to you. If your goal is making predictions, you live and die by cross validation. – Matthew Drury May 3 '18 at 4:25
• In particular, p-values have nothing to do with the predictive power of the variable, and in no circumstances are there to measure if the variable should or should not be included in a model. If you are not using the model to test hypotheses, they are just noise in your regression output. – Matthew Drury May 3 '18 at 4:26

1. I do not see much evidence of heteroskedasticity in your data - the residuals look reasonably uniform across fitted values.
2. Lasso will handle multicollinearity by shrinking all but one correlated feature; ridge or elastic net regularized regression are generally preferred in such situations since they penalize these features equally. The glmnet vignette describes the difference:

It is known that the ridge penalty shrinks the coefficients of correlated predictors towards each other while the lasso tends to pick one of them and discard the others.

1. It should be expected that the lasso and OLS fits diverge, particularly when collinearities exist; lasso is performing a feature selection (finding a parsimonious model), while OLS will fit whatever you ask of it (always producing a more complex model than the lasso).
• based on the F test it is hetroskedasticity. Also the cyclicity in residual plot worries me – itthrill May 3 '18 at 4:11
• The F test performed by a summary.lm in R does not test a hypothesis of heteroskedasticity. It tests the reduction in residuals for a full model against an intercept only model; the results of the F test may be inconsistent if there is non-constant variance, but we cannot draw that inference from the F-test result. – khol May 3 '18 at 4:26