Is it possible to incorporate lasso variable selection in the high dimensional state space model. If yes, is there any code or package available in R


Thanks for your question!

There are 2 packages in R (to my knowledge) that allow you to use LASSO variable selection.

Package 1: glmnet

Package 2: lars

How to use it?

  1. glmnet function

General: glmnet(x, y, family=c("gaussian","binomial","poisson","multinomial","cox","mgaussian"), weights, offset=NULL, alpha = 1, nlambda = 100, lambda.min.ratio = ifelse(nobs))

Your case: x is an input matrix, y is a response, alpha = 1 means it is using LASSO method. If you set alpha = 0 it will use Ridge Regularization method.

  1. lars function

General: lars(x, y, type = c("lasso", "lar", "forward.stagewise", "stepwise"), trace = FALSE, normalize = TRUE, intercept = TRUE, Gram, eps = .Machine$double.eps, max.steps, use.Gram = TRUE)

Your case: lars(x, y, type = lasso) where x is a matrix of predictors, and y is a response.

  • $\begingroup$ Welcome to our site. The interest in this question is not in the code request, but in incorporating Lasso in a high-dimensional state-space model. How would you propose doing that? $\endgroup$ – whuber Jan 12 at 19:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.