# Variable selection: Why certain categories are chosen but not others?

I'm doing variable selection using the Lasso.

To explain my response variable I have several predictors, both categorical and numerical, but I have problems to explain the process that underlies when Lasso selects only a category from a variable with several categories.

For example, one of my predictors is a categorial variable with four levels, and Lasso just selects one of them. So, Lasso is working with the whole variable (the four categories) but some may "enter" and some not. How can I explain this? It's something related with Analysis of Covariance?

I hope my question makes sense and I would appreciate a not very mathematical answer.

• It would be typical to treat categorical variables as factors, all of whose levels are in or not-in at the same time. I believe functions in the R packages grpreg, grplasso and glmnet can all do this. – Glen_b Sep 10 '14 at 0:50