3
$\begingroup$

I was speaking to a statistician recently who suggested that using dummy variables rather than one variable with several levels reduced the constraints on models, particular reducing the assumption of linearity. I didn't understand the explanation and was wondering if someone could make it clear?

$\endgroup$
  • $\begingroup$ Is the variable ordinal or nominal? If it's nominal, I don't understand his comment either, but if it's ordinal, I sort of vaguely see something. $\endgroup$ – Peter Flom Mar 6 '12 at 12:23
  • 1
    $\begingroup$ I believe that some statistical packages will automatically convert ordinal variables (factor variables in R) to dummy variables in a linear regression, so you might not actually need to create dummy variables yourself. You might have essentially been following their advice without knowing it. $\endgroup$ – Wayne Mar 6 '12 at 15:51
3
$\begingroup$

Perhaps he is saying that treating an ordinal variable as continuous (which is reasonably common) means more assumptions in the relationship to the response variable than if you treat it properly as a categorical factor (nominal or ordinal).

If you treat an ordinal variable as though it is continuous you are assuming that the differences between different adjacent levels of the scale are in some sense constant, as well as that this variable is linearly related to the response (assuming you have a linear model).

$\endgroup$
  • 1
    $\begingroup$ A good example I found online was if you code school type as: Elementary School (1), Middle School (2), High School (3), and College (4). By most measures, the difference between Elementary School and Middle School is not the same as the difference between High School and College. $\endgroup$ – Wayne Mar 6 '12 at 15:54
  • $\begingroup$ Also, to illustrate the difference: if you code your school type variable in R as a numeric, it will be treated quite differently than if you code it as a factor (which I believe will create dummy variables under the hood). In the first case, it will be treated as continuous which makes no sense, though it may actually work. $\endgroup$ – Wayne Mar 6 '12 at 16:18
  • $\begingroup$ And if you code it as an ordered factor you get an even more appropriate treatment that coded as a factor. $\endgroup$ – Peter Ellis Mar 6 '12 at 23:57

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.