BookmarkSubscribeRSS Feed
deleted_user
Not applicable
how do you code more than 0,1 dummy variable if you have more than 2 dummies?
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
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.

Doc

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1442 views
  • 0 likes
  • 2 in conversation