BookmarkSubscribeRSS Feed
Jamelle
Calcite | Level 5


I have been working on a SAS code for 3 weeks in which I am trying to run multinomial logistic regression, with no luck.  I think the challenge for me is that all of my variables have been coded as dummy variables and I am having a problem writing the code placing variables into classes.  Please help...

2 REPLIES 2
AncaTilea
Pyrite | Level 9

Hi.

Your question is not all that well written.

So, do you have something like this?

PROC GENMOD DATA = YOUR_DATA;

     MODEL Y = DUMMY_1 DUMMY_2 DUMMY_3 X1 X2 X3;

RUN;QUIT;

and you want something like this?

PROC GENMOD DATA = YOUR_DATA;

CLASS CATEG_VAR;

     MODEL Y = CATEG_VAR X1 X2 X3;

RUN;QUIT;

So, let's say you have 2 dummy variable for race: Dummy_White, Dummy_Black, and no Dummy for "Other" group.

You woudl like to create a RACE variable something like this?

if Dummy_White = 1 then RACE = "White";

else if Dummy_Black = 1 then RACE = "Black";

else Race = "Other";

Then you run your model with CLASS Race and so on...

So, am I going in the right direction with what you need...or neah?

Smiley Happy

1zmm
Quartz | Level 8

Multinomial logistic regression implies a nominal dependent variable.  Anca tilea suggested a reasonable approach for combining separate dummy variables into one variable, though the emphasis was on independent variables, not dependent variables.  In that example, the single variable, Race, would have multiple values and would be used as the DEPENDENT variable.

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1275 views
  • 0 likes
  • 3 in conversation