BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ybz12003
Rhodochrosite | Level 12

Hello:

 

I have the following modeling would like to use proc logistic to analyze.  I don't have SAS in installed in my computer, my data set is mega-dataset.  I am not sure whether the code I write is correct?  Please correct me if I am wrong.  Thanks.

 

Three categorical response variables: Y1 (normal),  Y2 ( medium), Y3 (Severe)
 
Explanatory variables:  
variable X1 (categorical):  yes or no
variable X2 (categorical):  yes or no
variable X3 (categorical):  little, medium, most and all.
 
proc logistic data=test descending;
class X1 (ref="no") X2 (ref="no") X3 (ref="little") / param=ref;
model Y = X1 X2 X3;
format X1 yesno. X2 yesno. X3 degree. ;
title3 "Ordinal outcome (cumulative logit)";
run;
 
1 ACCEPTED SOLUTION

Accepted Solutions
clim072
Fluorite | Level 6
What you had was fine. I assume that Y which your dependent variable has three levels (normal, medium and severe). In that case, Y should be listed in the class statement  too.
 
PROC LOGISTIC DATA = test DESCENDING;
CLASS X1 (ref="no") X2 (ref="no") X3 (ref="little") Y (ref = "normal")/ param=ref;
model Y = X1 X2 X3;
format X1 yesno. X2 yesno. X3 degree. ;
title3 "Ordinal outcome (cumulative logit)";
run;
 
# Modify Y (ref = "normal") to Y (ref = "medium")/ if you want to change your reference group
Hope it helps!

View solution in original post

1 REPLY 1
clim072
Fluorite | Level 6
What you had was fine. I assume that Y which your dependent variable has three levels (normal, medium and severe). In that case, Y should be listed in the class statement  too.
 
PROC LOGISTIC DATA = test DESCENDING;
CLASS X1 (ref="no") X2 (ref="no") X3 (ref="little") Y (ref = "normal")/ param=ref;
model Y = X1 X2 X3;
format X1 yesno. X2 yesno. X3 degree. ;
title3 "Ordinal outcome (cumulative logit)";
run;
 
# Modify Y (ref = "normal") to Y (ref = "medium")/ if you want to change your reference group
Hope it helps!

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