Programming the statistical procedures from SAS

Proc logistic for three levels of outcomes?

Accepted Solution Solved
Reply
Super Contributor
Posts: 297
Accepted Solution

Proc logistic for three levels of outcomes?

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;
 

Accepted Solutions
Solution
‎01-19-2017 11:15 AM
New Contributor
Posts: 4

Re: Proc logistic for three levels of outcomes?

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


All Replies
Solution
‎01-19-2017 11:15 AM
New Contributor
Posts: 4

Re: Proc logistic for three levels of outcomes?

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!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 129 views
  • 2 likes
  • 2 in conversation