# glmnet, categorical variable, group lasso?

I am using glmnet for LASSO. My data set contains several continuous variables and one categorical variable (it has four levels). I wondered if I could treat three dummy variables as other continuous variables. Should I use a type of group LASSO approach for the three dummies? I'm sorry if this is a dumb question.

• Normally, yes, you keep your factors all together. There's several R packages that can do this, including glmnet. – Glen_b Sep 10 '14 at 0:49
• @Glen_b What are the options in glmnet for running group lasso with categorical variables? I don't see anything about categorical variables at web.stanford.edu/~hastie/glmnet/glmnet_alpha.html or cran.r-project.org/web/packages/glmnet/glmnet.pdf – Adrian Feb 22 '17 at 16:57
• See the type.multinomial argument to glmnet – Glen_b Feb 22 '17 at 22:54