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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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