<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: logistic regression prediction residual in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740592#M231379</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I think you have posted the same question in 'Statistical Procedures' under Analytics (probably on my recommendation, see 1st answer of mine).&lt;/P&gt;
&lt;P&gt;Did you get enough information over there from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;or do you still want me to search for a reference (I believe Dave has given some references, but only author names)?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 19:36:17 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-05-11T19:36:17Z</dc:date>
    <item>
      <title>logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740226#M231179</link>
      <description>&lt;P&gt;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, &lt;STRONG&gt;Pearson&lt;/STRONG&gt; residual or&lt;STRONG&gt; Deviance&lt;/STRONG&gt; residual? As SAS code below,&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;reschi=pr&lt;/STRONG&gt;&lt;/CODE&gt;&amp;nbsp;is Pearson residual, &lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;resdev=dr&lt;/STRONG&gt;&lt;/CODE&gt;&amp;nbsp;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!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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 &lt;STRONG&gt;resdev=dr&lt;/STRONG&gt; h=pii &lt;STRONG&gt;reschi=pr&lt;/STRONG&gt; difchisq=difchi; 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 May 2021 16:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740226#M231179</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2021-05-10T16:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740525#M231340</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might get earlier response(s) when posting to the 'Statistical Procedures' board under Analytics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can use both&amp;nbsp;&lt;SPAN&gt;Pearson residuals or Deviance residuals (one out of two or both).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;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? &lt;BR /&gt;Suppose your PROC LOGISTIC is modeling for a "1" (check the LOG to see which outcome your PROC LOGISTIC is modelling for): &lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;if observation &lt;EM&gt;i&lt;/EM&gt; has 1 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.22.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;if observation &lt;EM&gt;i&lt;/EM&gt; has 0 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.78.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;You can also compare this 3rd type of residuals among groups.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 15:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740525#M231340</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-11T15:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740560#M231363</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much for your reply!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As to the plain 'prediction residuals' you said:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;if observation&amp;nbsp;&lt;EM&gt;i&lt;/EM&gt;&amp;nbsp;has 1 as actual outcome and 0.78 (78%) as predicted outcome, then your plain prediction residual = 0.22.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;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?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740560#M231363</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2021-05-11T17:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740585#M231375</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;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&amp;nbsp;observed y minus predicted y-values (as in a regular regression) but for a binary (0,1) response.&lt;/P&gt;
&lt;P&gt;Plots of raw&amp;nbsp;residuals&amp;nbsp;from&amp;nbsp;logistic regression&amp;nbsp;are generally not so useful, but I think you can perfectly use these raw residuals to compare groups.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I will check this track again tomorrow.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 19:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740585#M231375</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-11T19:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740592#M231379</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I think you have posted the same question in 'Statistical Procedures' under Analytics (probably on my recommendation, see 1st answer of mine).&lt;/P&gt;
&lt;P&gt;Did you get enough information over there from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;or do you still want me to search for a reference (I believe Dave has given some references, but only author names)?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 19:36:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740592#M231379</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-11T19:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: logistic regression prediction residual</title>
      <link>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740598#M231383</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547"&gt;@sbxkoenk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll explore more on the references&amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633" target="_blank"&gt;tatDave_sas&lt;/A&gt;&amp;nbsp;provided. At the same time, I truly appreciate your time and help. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 19:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/logistic-regression-prediction-residual/m-p/740598#M231383</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2021-05-11T19:56:30Z</dc:date>
    </item>
  </channel>
</rss>

