Programming the statistical procedures from SAS

Trouble developing code for multinomial logistic regression

Reply
N/A
Posts: 1

Trouble developing code for multinomial logistic regression


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

Super Contributor
Posts: 543

Re: Trouble developing code for multinomial logistic regression

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

Regular Contributor
Posts: 152

Re: Trouble developing code for multinomial logistic regression

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.

Ask a Question
Discussion stats
  • 2 replies
  • 185 views
  • 0 likes
  • 3 in conversation