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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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