I am trying to fit a multinomial logit model using glmnet. I have a few questions:
How is the baseline category specified?
Looking at the model coefficients using coef.glmnet, I'm thinking that many are given by a dot. I assume this means the coefficient was set to zero by LASSO, so the variable was dropped. However, I'm finding that variables are dropped this way even when lambda=0, so there is no regularizing term. Can someone explain what's going on here?
Sometimes I find that a variable is dropped in some but not all of the logits. How should this be interpreted?
Here is a working example:
library(glmnet) data(iris) X <- model.matrix(Species ~., data=iris) y <- iris$Species fit <- glmnet (X, y, family="multinomial") coef(fit, s=0)