predict.lm has an option to return confidence intervals of predictions from lm models. Is there a way I can obtain the confidence intervals or SE of predictions from a glmnet model?
library(glmnet)
x <- as.matrix(mtcars[-1])
y <- mtcars$mpg
fit <- glmnet(x,y, alpha=1, lambda=0.01)
pred <- predict(fit, x, interval="confidence") #predict.elnet doesn't have an 'interval' parameter