Skip to content
Prev 258661 / 398502 Next

Lasso with Categorical Variables

Thanks for your response, but I guess I didn't make my question clear.
I am already familiar with the concept of dummy variables and
regression in R. My question is, can the "lars" package (or some other
lasso algorithm) handle factors? I did use dummy variables in my
original data, but lars (lasso) only shrank the coefficients of some
of the levels of one factor to 0. Is this the correct thing to do?
Because intuitively it seems like I would want to shrink the whole
factor coefficient to 0. If this is correct, what is the
interpretation? For example, for X1, if lasso drops the coefficient
for levels A and B, but not C and D, does this mean that X1 should be
included in the model?
Thanks.
On Mon, May 2, 2011 at 2:47 PM, David Winsemius <dwinsemius at comcast.net> wrote: