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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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