0
$\begingroup$

I have 2 questions regarding using glinternet:

  1. For continuous response variables, is there a distribution assumption for Normal to use the model?
  2. To encode Categorical predictor variable, does the function accept dummy coding? such as after using model.matrix? Or it only accepts encoded as 0, 1, 2, 3, ... as the package doc describes?
$\endgroup$

migrated from stackoverflow.com Jun 16 '15 at 4:03

This question came from our site for professional and enthusiast programmers.

  • $\begingroup$ These are two very different questions, you should ask them separately. The first one also isn't a programming question, you should ask on stats.stackexchange, not here. As to the second question, have you tried? $\endgroup$ – Gregor Jun 5 '15 at 19:00
  • $\begingroup$ Thanks for your comment Gregor. Regarding to my 2nd question, I don't worry that glinternet() or glinternet.cv() will spit an error or not if I use model.matrix() dummy coding for Catagorical var, because it will not, since the CRAN doc gives examples using 0,1,2,3, ... coding for a Categorical var, but my concern is if I dummify my Categorical Variable with 3 levels, will the function interpret it as 3 Categorical Var with 2 levels each instead of 1 Categorical Var with 3 levels. Thanks for your input. $\endgroup$ – Yue Harriet Huang Jun 5 '15 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.