turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Proc logistic for three levels of outcomes?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-16-2017 09:16 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-17-2017 12:39 AM

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!

All Replies

Solution

01-19-2017
11:15 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-17-2017 12:39 AM

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!