<?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: Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/273049#M14383</link>
    <description>&lt;P&gt;You can &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm" target="_self"&gt;read about estimates of scale in the GENMOD documentation.&lt;/A&gt;&amp;nbsp; You didn't show your code, so we don't know how the scale was estiamted, but with df=9037, there is bound to be a sizeable difference between the scaled and unscaled deviance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The p-values are the probability of observing a random observation from the chisq(df=9037) distribution that is at least as great as 8297 (for the deviance) or 10223 (for the scaled deviance).&amp;nbsp; You can look at the reference lines in the following plot to confirm that the computations are correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let df = 9037;
data PDF;
do x = 8000 to 10300 by 20;
   chi2 = pdf("chisquare", x, &amp;amp;df);
   output;
end;
run;

proc sgplot data=pdf;
series x=x y=chi2;
refline 10223 8297 / axis=x;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 25 May 2016 15:32:05 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-05-25T15:32:05Z</dc:date>
    <item>
      <title>Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/271913#M14299</link>
      <description>&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Dear Sir or Madam,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;How are you?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;I am writing to ask your advice on&amp;nbsp;the adequacy between 2 Gamma models on log link from proc genmod. Is B better? Do I also have to look at the diagnostic plots? Thank you very much.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="4"&gt;&lt;FONT face="times new roman,times"&gt;(1) One 5-level covariate(x)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Criteria For Assessing Goodness Of Fit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 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; Value/DF&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 9147&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8893.7611&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9723&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 9147&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10383.5112&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1352&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;Pearson Chi-Square&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9147&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25589.8917&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.7976&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;Scaled Pearson X2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9147&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29876.3286&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.2662&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; -48608.2903&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; -48608.2903&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 97228.5806&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 97228.5898&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 97271.3110&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;(2)&amp;nbsp;Two&amp;nbsp;&lt;SPAN&gt;5-level covariates(x and y) and their interaction term&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Criteria For Assessing Goodness Of Fit&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 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; Value/DF&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 9037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8296.5195&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9181&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 9037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10223.2934&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.1313&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;Pearson Chi-Square&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24705.1601&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.7338&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&gt;Scaled Pearson X2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9037&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30442.6575&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3.3687&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; -47833.7561&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; -47833.7561&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 95719.5123&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 95719.6677&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="4"&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; 95904.4202&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 06:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/271913#M14299</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2016-05-20T06:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/272042#M14306</link>
      <description>&lt;P&gt;The IC criteria all point to the second model (B) as being superior, while none of the other GoF parameters really point to any difference between the two. &amp;nbsp;However, I would still examine the observed vs. predicted plot to check for any systematic bias.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 16:51:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/272042#M14306</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-05-20T16:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/272931#M14379</link>
      <description>&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham﻿&lt;/a&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Thank you for your insight.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Can I please ask you why is the p-value from the second model (2) so different between the Deviance and the Scaled Deviance?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;As far as I have understand, the p-value from the deviance(p=0.999999992)&amp;nbsp;says the model fits the data reasonably well.&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="times new roman,times" size="4"&gt;But why is it 0 from the Scaled deviance. I don't understand.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;I plotted the histogram of&amp;nbsp;&lt;SPAN&gt;deviance residual, standardized deviance residual and&amp;nbsp; likelihood residual from the model to check for normality and they do not indicate any departure from normality.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;&lt;SPAN&gt;I further checked the actual value against the predicted value and it is hardly a straight line.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Any insight will be greatly appreciated.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;4996  data _null_; p=1-probchi(8296.5195,9037); put p=; run;

p=0.9999999925
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


4997  data _null_; p=1-probchi(10223.2934,9037); put p=; run;

p=0&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 02:51:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/272931#M14379</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2016-05-25T02:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/273049#M14383</link>
      <description>&lt;P&gt;You can &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm" target="_self"&gt;read about estimates of scale in the GENMOD documentation.&lt;/A&gt;&amp;nbsp; You didn't show your code, so we don't know how the scale was estiamted, but with df=9037, there is bound to be a sizeable difference between the scaled and unscaled deviance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The p-values are the probability of observing a random observation from the chisq(df=9037) distribution that is at least as great as 8297 (for the deviance) or 10223 (for the scaled deviance).&amp;nbsp; You can look at the reference lines in the following plot to confirm that the computations are correct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let df = 9037;
data PDF;
do x = 8000 to 10300 by 20;
   chi2 = pdf("chisquare", x, &amp;amp;df);
   output;
end;
run;

proc sgplot data=pdf;
series x=x y=chi2;
refline 10223 8297 / axis=x;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 May 2016 15:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/273049#M14383</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-25T15:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Assessing Goodness Of Fit of Gamma on log link models from Proc Genmod</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/273202#M14389</link>
      <description>&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;.&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="times new roman,times" size="4"&gt;Thank you for your reply. &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman,times" size="4"&gt;I have read but sadly I still don't understand.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman, times" size="4"&gt;&lt;SPAN style="line-height: normal;"&gt;Please find my code below if that would be helpful.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="times new roman, times" size="4"&gt;&lt;SPAN style="line-height: normal;"&gt;Thank you very much.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
proc genmod data=temp plots=all;
	class country raps;
	model occamt=country raps country*raps / dist=gamma link=log type3;
	lsmeans raps country country*raps / pdiff ilink adj=tukey;
	contrast 'linear' raps -2 -1  0  1  2;
	contrast 'quadratic' raps 2 -1 -2 -1  2 ;
	contrast 'cubic' raps -1  2  0 -2  1;
	output out=Residuals
		pred=Pred resraw=Resraw	reschi=Reschi resdev=Resdev
		stdreschi=Stdreschi stdresdev=Stdresdev	reslik=Reslik;
run;
proc univariate data=Residuals normal; 
	var Resraw Reschi Stdreschi Resdev Stdresdev Reslik;
	histogram/ normal;
run;
proc gplot data=residuals; plot Resdev*Pred; run; quit;
proc gplot data=residuals; plot Stdresdev*Pred; run; quit;
proc gplot data=residuals; plot Reslik*Pred; run; quit;
proc gplot data=residuals; plot occamt*Pred; run; quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 05:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Assessing-Goodness-Of-Fit-of-Gamma-on-log-link-models-from-Proc/m-p/273202#M14389</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2016-05-26T05:46:47Z</dc:date>
    </item>
  </channel>
</rss>

