Following this
(https://stats.stackexchange.com/questions/125235/glmnet-which-is-the-reference-category-or-class-in-multinomial-regression).
I have 3 categories or classes or responses variable:
- Case (reference group)
- group1
- group2
When I run
fit <- cv.glmnet(x, y,family="multinomial", alpha=1) and <- coef(fit, s = bestlambda)
I get
coefs
Case group1 group2
Feature1 0.10 0.0 0.0
Feature2 0.00 0.20 0.0
Here it shows the Feature1 is important for a Case
, Feature2
is important for group2
(coefficient > 0). But I am interested to set a Case as a reference category. Any suggestions?