I have a data set with 3 continuous variables and 3 categorical variables. I know that I have to create dummy variables for categorical variables but I am wondering if it is a must to do that for all 3 categorical variables in this case?
Tell me more
×
Cross Validated is a question and answer site for
statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.
|
|
R does this for you, as @Julie said. But so do SAS and SPSS (and probably all other major stats packages). Be careful, though, as different packages have different defaults for the way they code categorical variables. In R, see this document dummy coding is the default in lm() for unordered factors; the same is true in SAS PROC GLM, but unfortunately, PROC LOGISTIC uses effect coding by default. |
|||
|
|
|
One advantage (out of many) of using R is that it takes care of this problem for you -- no need to assign dummies (just make sure the categorical variables are entered as strings instead of numbers). Some basics: Multiple regression in R |
|||||||||
|