<?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: How to get Residual Deviance and DFFITS using proc genmod in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328716#M17338</link>
    <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;EM&gt;I want to save&amp;nbsp;the Deviance (170.1860 as in the above output) in some variable/dataset. How can it be done?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;See the article &lt;A href="http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;"ODS OUTPUT: Store any statistic created by any SAS procedure"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp; How to calculate DFFITS?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The DFFITS option is not available in PROC GENMOD because that statistic assumes an identity link function. However, you can use the COOKDS&amp;nbsp;statistic, which is very similar and provides similar information about the influence of each observation on the fit.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2017 12:57:21 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-01-31T12:57:21Z</dc:date>
    <item>
      <title>How to get Residual Deviance and DFFITS using proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328708#M17336</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use Proc Genmod to build Count Regression Model on Poisson.&amp;nbsp;I have written the code as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc genmod data = COUNT_data;&lt;BR /&gt;model count = KM /dist = poisson;&lt;BR /&gt;output out = outpt predicted = pred_val resdev = r_dev;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here I have tried to output the predicted values, deviance residual in variables pred_val, r_dev respectively in the output dataset - &amp;nbsp;outpt. Output of this proc executed is as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS System&lt;/P&gt;&lt;P&gt;The GENMOD Procedure&lt;/P&gt;&lt;P&gt;Model Information&lt;/P&gt;&lt;P&gt;Data Set WORK.COUNT_DATA&lt;/P&gt;&lt;P&gt;Distribution Poisson&lt;/P&gt;&lt;P&gt;Link Function Log&lt;/P&gt;&lt;P&gt;Dependent Variable Count&lt;/P&gt;&lt;P&gt;Number of Observations Read 222&lt;/P&gt;&lt;P&gt;Number of Observations Used 222&lt;/P&gt;&lt;P&gt;Criteria For Assessing Goodness Of Fit&lt;/P&gt;&lt;P&gt;Criterion&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value/DF&lt;/P&gt;&lt;P&gt;Deviance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 170.1860&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.7736&lt;/P&gt;&lt;P&gt;Scaled Deviance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 170.1860&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.7736&lt;/P&gt;&lt;P&gt;Pearson Chi-Square&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 199.7315&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9079&lt;/P&gt;&lt;P&gt;Scaled Pearson X2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 199.7315&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9079&lt;/P&gt;&lt;P&gt;Log Likelihood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -91.0389&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Full Log Likelihood&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -371.0120&lt;/P&gt;&lt;P&gt;AIC (smaller is better)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 746.0240&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AICC (smaller is better)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 746.0788&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BIC (smaller is better)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 752.8294&lt;/P&gt;&lt;P&gt;Algorithm converged.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Analysis Of Maximum Likelihood Parameter Estimates &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Parameter DF Estimate Standard Error&amp;nbsp;&amp;nbsp;&amp;nbsp; Wald 95% Confidence Limits Wald Chi-Square Pr &amp;gt; ChiSq&lt;/P&gt;&lt;P&gt;Intercept &amp;nbsp;&amp;nbsp;1 &amp;nbsp;&amp;nbsp;&amp;nbsp;0.5680 &amp;nbsp;&amp;nbsp;&amp;nbsp;0.1108 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.3508 &amp;nbsp;&amp;nbsp;0.7852 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;26.27 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;.0001&lt;/P&gt;&lt;P&gt;KM &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 &amp;nbsp;&amp;nbsp;&amp;nbsp;0.0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;0.0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0000 &amp;nbsp;&amp;nbsp;0.0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;6.08 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0137&lt;/P&gt;&lt;P&gt;Scale &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0 &amp;nbsp;&amp;nbsp;&amp;nbsp;1.0000&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.0000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.0000 &amp;nbsp;1.0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to save&amp;nbsp;the Deviance (170.1860 as in the above output) in some variable/dataset. How can it be done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, How to calculate DFFITS? I want to find such observations where DFFITS &amp;gt; 2 * sqrt(2/n). I have seen that DFBETAS is available&amp;nbsp;as an Output Statment option. On similar lines, is DFFITS available too?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 12:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328708#M17336</guid>
      <dc:creator>amanegm</dc:creator>
      <dc:date>2017-01-31T12:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Residual Deviance and DFFITS using proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328716#M17338</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;EM&gt;I want to save&amp;nbsp;the Deviance (170.1860 as in the above output) in some variable/dataset. How can it be done?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;See the article &lt;A href="http://blogs.sas.com/content/iml/2017/01/09/ods-output-any-statistic.html" target="_self"&gt;"ODS OUTPUT: Store any statistic created by any SAS procedure"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp; How to calculate DFFITS?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The DFFITS option is not available in PROC GENMOD because that statistic assumes an identity link function. However, you can use the COOKDS&amp;nbsp;statistic, which is very similar and provides similar information about the influence of each observation on the fit.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 12:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328716#M17338</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-31T12:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Residual Deviance and DFFITS using proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328723#M17340</link>
      <description>Thank you Rick. That was very helpful.&lt;BR /&gt;DFFITS is not available in Proc Genmod. But is it correct to use DFFITS in Proc Genmod, if I calculate it by some other means. I am using Log Link function.&lt;BR /&gt;&lt;BR /&gt;Also, in R, if I build similar model as below:&lt;BR /&gt;l = glm(resp[[1]] ~ unlist(regr[[1]]) , family="poisson")&lt;BR /&gt;&lt;BR /&gt;DFFITS function is available to compute that statistic.&lt;BR /&gt;&lt;BR /&gt;So I am confused if it the right way?</description>
      <pubDate>Tue, 31 Jan 2017 13:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328723#M17340</guid>
      <dc:creator>amanegm</dc:creator>
      <dc:date>2017-01-31T13:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Residual Deviance and DFFITS using proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328735#M17341</link>
      <description>&lt;P&gt;I do not know the answer to your question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For OLS, DFFITS are closely related to the Studentized residual. When the errors are normally distributed, you can use that relationship to derive the distribution of the DFFITS statistic. Because you know the sampling distribution, you can use criteria such as&amp;nbsp;&lt;SPAN&gt;DFFITS &amp;gt; 2 * sqrt(2/n) or 2 * sqrt(p/n) to find "extreme" values of the statistic.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Generalized linear models do not have Studentized residuals, they have other kinds of residuals (such as Pearson, deviance, or chi-square). You can compute the change in the deviance or chi-square that is attributed to deleting&amp;nbsp;each observation, and this becomes a measure of influence.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I was unable to find a textbook or journal article that explains how to generalize DFFITS to generalized linear regression models. Consequently, I recommend using one of the case-deletion statistics that PROC GENMOD provides, such as Cook's D.&amp;nbsp;Perhaps an expert such as &amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;&amp;nbsp;can provide additional insight.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 14:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/328735#M17341</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-01-31T14:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get Residual Deviance and DFFITS using proc genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/329084#M17369</link>
      <description>&lt;P&gt;I'll back up&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;on this one. &amp;nbsp;DFFITS is not appropriate for generalized linear models, as the studentized residual depends on the assumption of normality of errors. &amp;nbsp;Cook's D has been used fairly regularly to check for influential observations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-get-Residual-Deviance-and-DFFITS-using-proc-genmod/m-p/329084#M17369</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2017-02-01T13:36:58Z</dc:date>
    </item>
  </channel>
</rss>

