# elastic net- confidence intervals for parameters

Can I see the intervals and p values for each coefficient in elastic net model? I wrote:

elastNet<-cv.glmnet(pred, comp,alpha=.8,standardize = TRUE, family="binomial",type.measure="auc")


If I write the following I get the numbers, but no intervals.

coef(elastNet)


Also I can add the parameter s (I guess is the lambda value)

coef(elastNet,s=0.01)


To choose a lambda value first I saw the graph: And also considered:

> elastNet$lambda.min  0.0007603077 > elastNet$lambda.1se
 0.01492515


So I decided to choose sth in the middle:

coef(elastNet,s=0.01)


And I got 26 variables with values (I had 59).

I would like to know the confidence interval for each variable. Can I get some idea of this form the following graph? Also, I f I need the KS measure, does the software provides it?

• why do you want the confidence intervals? The parameter estimates are all biased and therefore any inference will be misleading. – Jacob H Jun 8 '18 at 22:27

## 2 Answers

I don't think this is currently possible; see these slides [PDF] of Rob Tibshirani. Slide 13 mentions they can't yet provide a p-value for terms in a lasso model. Those slides describe a test that gives p-values of terms as they enter the Lasso model.

One further assumes therefore that confidence intervals are not available either.

There is the selectiveInference package in R, https://cran.r-project.org/web/packages/selectiveInference/index.html, that provides confidence intervals and p values for your coefficients fitted by the LASSO, based on the following paper:

Stephen Reid, Jerome Friedman, and Rob Tibshirani (2014). A study of error variance estimation in lasso regression. arXiv:1311.5274

I think the approach would require some modifications for the elastic net though...