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

Hi, 

How to I make a residuals plot for a logit model? I only found this link. But I would like to plot the residuals against one of the independent variables, not just "by case number". What options do I use?

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ
It's always necessary to see the syntax information in the procedure documentation. There are several types of residuals. Adding this would save the Pearson and deviance residuals in a data set called MyRes.

output out=myres reschi=rc resdev=rd;

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

You can use the options in the OUTPUT statement to save any residuals that you like. Then, with the resulting data set, you can construct the plot you want using PROC SGPLOT.

drdee
Obsidian | Level 7

Thanks, sounds good. Can you provide some details on how to output residuals?

StatDave
SAS Super FREQ
It's always necessary to see the syntax information in the procedure documentation. There are several types of residuals. Adding this would save the Pearson and deviance residuals in a data set called MyRes.

output out=myres reschi=rc resdev=rd;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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
  • 3 replies
  • 2483 views
  • 3 likes
  • 2 in conversation