BookmarkSubscribeRSS Feed
hafidwr
Calcite | Level 5

I have a problem. I made a multinomial logistic regression analysis using SAS (I'm new to this). A have a code like this:

proc print data=lasso;
run;

proc logistic data=lasso;
class Y (ref="3") X2(ref="1") X3(ref="3") X4(ref="4") X5(ref="3") X6(ref="3") X7(ref ="3") X8(ref ="3") X9(ref="3") X10(ref="2") X11(ref ="4") X12(ref ="3")/param=ref;
model Y = X1 / link =genlogit;
run;

In the output. My categorical predictor won't come out. Only X1 which is non categorical, that came out. What's wrong with this?

1 REPLY 1
Rick_SAS
SAS Super FREQ

The classification variables X2-X12 do not appear in the model because you have not listed them on the MODEL statement. It sounds like you want:

MODEL Y = X1-X12 / link=genlogit;

 

As to the Y variable, each nonreference value of that variable get a separate set of parameter estimates. In the parameter estimates table you will see an intercept for Y=1, Y=2, etc. Similarly, a coefficient for X1 for Y=1, Y=2, etc. 

 

Look at the output for this example and notice the second column displays the levels of Y to which the estimates are associated:

 

data Have;
call streaminit(123);
do i = 1 to 100;
   x1 = rand("Normal");
	y = rand("table", 0.3, 0.4, 0.2, 0.1);
	output;
end;
run;

proc logistic data=Have;
class Y (ref="3") /param=ref;
model Y = X1 / link =genlogit;
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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
  • 1 reply
  • 1212 views
  • 0 likes
  • 2 in conversation