Following my question in Cross Validate glmnet: which is the reference category or class in multinomial regression?, can someone explain how can we set the reference category in glmnet for multinomial logistic regression?
Even though glmnet is for applying shrinking methods (Ridge, Lasso, etc.) neither its documentation nor glmnet forums out there answer this question.
Thank you in advance
Well no you cannot do that in the function glmnet but you can do that very easily just before you run the function using model.matrix:
cat_dummified
is also ofclass matrix
, ready to use in theglmnet
function. This way you have only 3 dummies for which you will have coefficients and are referenced against the no-cat category.Hope this helps!