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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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