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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 617 views
  • 0 likes
  • 2 in conversation