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...
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?
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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.