Help using Base SAS procedures

multiple dummy variables

Posts: 0

multiple dummy variables

how do you code more than 0,1 dummy variable if you have more than 2 dummies?
Trusted Advisor
Posts: 2,113

Re: multiple dummy variables

Say you have a 3 level variable,Orig, that you want to code as dummies. Say, also, that level 1 is the baseline or standard and levels 2 and 3 are the levels of interest.

For 'reference cell' coding, Dummy2 would have 0 for orig=1 and 1&3 for orig=2.
Dummy3 would have 0 for orig=1&2 and 1 for orig=3. Dummy2 would then be a flag for membership in Orig=2 and Dummy3 would be a flag for Orig=3.

There is another coding scheme, called EFFECT coding, that is also commonly seen in linear models. Look at the CLASS statement in the documentation for LOGISTIC or GLM.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation