BookmarkSubscribeRSS Feed
233
Calcite | Level 5 233
Calcite | Level 5

Hi,

I'm dealing with a problem of logistic regression and I am confused about including the categorical classification variable in the model.

The variables in the model are R Age S Ed Ex0 Ex1 LF M N NW U1 U2 W X respectively;

I have to fit the logistic regression model of high as a function of all variables using Age through X

and treat S as a categorical classification variable in the model.

Below are my codes

 

proc logistic data=uscrime;
         class S /param=ref ref=first;
         model high = Age S Ed Ex0 Ex1 LF M N NW U1 U2 W X;
         ods select ModelInfo ParameterEstimates Type3 OddsRatios;
 run;

 

Am I in the right way or is there any suggestions? Thanks!

1 REPLY 1
pau13rown
Lapis Lazuli | Level 10

seems fine. if you're unsure you could always create the indicator variables for S in a data step and then fit these in model and confirm the results correspond etc

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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