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?
1 Answer
$\begingroup$
$\endgroup$
As far as I am aware glmnet doesn't have this feature implemented yet. @Glen_b's suggestion of using type.multinomial is used to group variables across all responses in a multinomial model, but there's no way of grouping independent variables in a model. see
https://cran.r-project.org/web/packages/grplasso/grplasso.pdf
for an alternative.
glmnet
. $\endgroup$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 $\endgroup$type.multinomial
argument toglmnet
$\endgroup$