Solved – GLM Interaction Lasso

generalized linear modelinteractionlasso

Apparently the stepwise produce in R is not a good way to automatically select the best glm model. Different sources suggest using lasso instead. I had a look at the glmnet packages but I do not understand how I can implement 2-way interaction terms in this packages. Also if somebody knows a webpage that explains the lasso approach in a not too mathematical way I would appreciate a lot.

Best Answer

I don't think the two comments are wrong, but I think the $\textit{best}$ discussion will be in Ch. 6 of 'Introduction to Statistical Learning with R' . This book discusses both best subset and regularization techniques (ridge, lasse et al). Finally the chapter ends with an R lab in which the 'how to' of coding in R for both methods is done. If by 'two way ' interactions you mean simply a regression with quadratic terms in the variables, that is also explained in the book. The book website has links to a pdf of the book, the code in the book and various other things. It is http://www-bcf.usc.edu/~gareth/ISL/