I am using logistic regression for a project, I want to examine whether prediction residuals differ between groups. From SAS output, it provides both Pearson residual and Deviance residual. If I want to examine whether prediction residual differ between groups, which one should I use, Pearson residual or Deviance residual? As SAS code below,reschi=pr
is Pearson residual, resdev=dr
is Deviance residual. I spent some time searching, but I haven't got clear idea yet, so I come here to ask the experts. thanks!
proc logistic data=Have;
where first=1;
class aaa ppp;
model pass (event="1")=aaa ppp timeaftergrad schoolpass1;
output out=out_first p=prob xbeta=logit resdev=dr h=pii reschi=pr difchisq=difchi;
run;
Hello,
You might get earlier response(s) when posting to the 'Statistical Procedures' board under Analytics.
Anyway, I suppose GROUP is not in your model as an explanatory variable? From your question and code I think you are running as many Logistic Regressions as there are GROUPs, correct?
I think you can use both Pearson residuals or Deviance residuals (one out of two or both).
You can also calculate plain 'prediction residuals'. I see your event equals "1". I assume you have a binary response and the non-event="0", correct?
Suppose your PROC LOGISTIC is modeling for a "1" (check the LOG to see which outcome your PROC LOGISTIC is modelling for):
You can also compare this 3rd type of residuals among groups.
Good luck,
Koen
Thanks much for your reply!
As to the plain 'prediction residuals' you said:
Could you please provide a document for me to refer, since this is something brand new to me. Can we calculate plain prediction residual in logistic regression as in regular regression, that is, y predict minus y observed?
Hello,
The word 'plain' comes from me, it's not standard terminology. I should be careful as English is not my mother tongue. Maybe I should have said 'RAW RESIDUALS' (or simply: prediction residuals) as I was simply referring to the observed y minus predicted y-values (as in a regular regression) but for a binary (0,1) response.
Plots of raw residuals from logistic regression are generally not so useful, but I think you can perfectly use these raw residuals to compare groups.
I will try to find a reference paper where some logistic regression diagnostics are based on raw residuals. I understand you may need more 'evidence'. I hope I can trace down one quickly. I will do that tomorrow as it's after 21h.00 here in Belgium.
I will check this track again tomorrow.
Cheers,
Koen
Hello,
I think you have posted the same question in 'Statistical Procedures' under Analytics (probably on my recommendation, see 1st answer of mine).
Did you get enough information over there from @StatDave or do you still want me to search for a reference (I believe Dave has given some references, but only author names)?
Thanks,
Koen
I'll explore more on the references tatDave_sas provided. At the same time, I truly appreciate your time and help. Thank you so much!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.