Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- Programming
- /
- logistic regression prediction residual

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 05-10-2021 12:22 PM
(916 views)

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,

is Pearson residual, **reschi=pr**

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! **resdev=dr**

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

5 REPLIES 5

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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):

- if observation
*i*has 1 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.22. - if observation
*i*has 0 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.78.

You can also compare this 3rd type of residuals among groups.

Good luck,

Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks much for your reply!

As to the plain 'prediction residuals' you said:

- if observation
*i*has 1 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.22.

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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.