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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Walternate
Obsidian | Level 7

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;

View solution in original post

10 REPLIES 10
Reeza
Super User

Show your work/code please. 

AncaTilea
Pyrite | Level 9

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.

Walternate
Obsidian | Level 7

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;

Reeza
Super User

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.

Walternate
Obsidian | Level 7

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

Thanks!

AncaTilea
Pyrite | Level 9

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.

Smiley Happy

----

Reeza
Super User

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

AncaTilea
Pyrite | Level 9

Thank you.

Reeza
Super User

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?

AncaTilea
Pyrite | Level 9

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...;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 8534 views
  • 3 likes
  • 3 in conversation