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
- /
- SAS Programming
- /
- General Programming
- /
- Residuals in logistic regression

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-28-2013 10:43 AM

Hello,

I have created a multiple logistic regression model and am trying to look at the residuals. The only process I have found (iplots) prints residuals for about 100 participants at a time, which is not ideal since I have over 5000 study subjects. Any help is much appreciated!

Thanks.

Accepted Solutions

Solution

01-28-2013
11:14 AM

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

01-28-2013 11:14 AM

proc logistic data=mydata;

class var1(reference=1) var2(reference=1) var3(reference=1);

model case(event='1')=var1 var2 var3/rsq ctable pprob=(0 to 1 by .1) lackfit risklimits iplots;

run;

All Replies

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

01-28-2013 11:02 AM

Show your work/code please.

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

01-28-2013 11:13 AM

How about

**ODS GRAPHICS ON;**

proc logistic data = your_data **plots = (all);**

model y = x;

run;

In my case, the plots are saved on the C:\Documents and Settings\User

Good luck,

Anca.

Solution

01-28-2013
11:14 AM

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

01-28-2013 11:14 AM

proc logistic data=mydata;

class var1(reference=1) var2(reference=1) var3(reference=1);

model case(event='1')=var1 var2 var3/rsq ctable pprob=(0 to 1 by .1) lackfit risklimits iplots;

run;

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

01-28-2013 11:21 AM

I think Anca solution is what you're looking for. In addition, I think you need to add the /param=ref option to your class statement.

Take a look at your output, specifically the Class level information and see if its what you want (basically your design matrix) or if you want the option I suggested.

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

01-28-2013 11:28 AM

Could you please explain what the /param=ref option is for?

Thanks!

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

01-28-2013 11:31 AM

In your class statement you use 'reference = 1', which tells SAS that for the variable var1 the reference category is '1'.

You need the **param = ref **to tell SAS to use that reference ** coding** in parameter estimates.

----

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

01-28-2013 11:32 AM

Not quite, it can still use that as the reference for Effect coding, but it won't be what you want necessarily.

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

01-28-2013 11:37 AM

Thank you.

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

01-28-2013 11:31 AM

It specifies how SAS creates the design matrix for class variables, the default is 'EFFECT CODING' when most people want 'REFERENCE CODING' instead.

SAS FAQ: In PROC LOGISTIC why aren't the coefficients consistent with the odds ratios?

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

01-28-2013 11:21 AM

When I tried to run plots with Logistic with a data set that has more than 5000 observations I get this warning:

-------------

WARNING: Some plots have more than 5000 observations and are suppressed. **Specify the**

** PLOTS(MAXPOINTS=NONE) option** in the PROC LOGISTIC statement to display the plots.

Did you try this?

proc logistic data = my_data **plots(maxpoints = none);**

model...;