I do not have experience of using LASSO regression glmnet. I wanted to use it to see which factors affect most my attribute. I have 99 factors (binomial) that affect one attribute (numeric). Is it reasonable to use lasso in my case? thanks,
1 Answer
Yes, this kind of situation is more or less what the LASSO was designed for.
The fact that all of your predictors are binary shouldn't matter, and the basic LASSO is designed for continuous responses anyway.
One nice thing about the glmnet
package in R is that you can use "elastic net" regression instead of LASSO (by setting the argument alpha = 0.5
instead of the default 1
). This produces a "50-50 mixture" of LASSO and "ridge regression" that has been shown to produce superior results. The main difference is that if any of your predictors are correlated with each other, the elastic net will shrink them together, while LASSO tends to keep one and shrink the rest down to zero.