<?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: Why do PROC GENMOD and glm() in R show different standard errors? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/548081#M27362</link>
    <description>I read into the document and apparently PROC GENMOD use ML to estimate the scale. My question is, what is scale? I am familiar with the notation of "dispersion" and apparently, "scale" and "dispersion" are different in SAS. The following document states that "SAS works with scale" but doesn't give the definition of "scale":&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm#statug.genmod.genmodscale1" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm#statug.genmod.genmodscale1&lt;/A&gt;</description>
    <pubDate>Tue, 02 Apr 2019 23:58:51 GMT</pubDate>
    <dc:creator>chaog</dc:creator>
    <dc:date>2019-04-02T23:58:51Z</dc:date>
    <item>
      <title>Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547769#M27352</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I would like to fit a Tweedie GLM to the data. However, even though PROC GENMOD from SAS and glm() from R gives the same coefficient estimates, they give quite different standard error. What it the reason behind this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If we run the following R code,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;mydata &amp;lt;- read.csv("https://stats.idre.ucla.edu/stat/data/binary.csv")
mydata$rank &amp;lt;- as.factor(mydata$rank)
mydata$rank &amp;lt;- relevel(mydata$rank, ref = "1")

mytweedie &amp;lt;- glm(admit ~ gre + gpa + rank, data = mydata,
+     family = statmod::tweedie(var.power = 1.5, link.power = 0))
summary(mytweedie)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;R shows that&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;Coefficients:
              Estimate Std. Error t value Pr(&amp;gt;|t|)    
(Intercept) -3.4957360  0.7906423  -4.421 1.27e-05 ***
gre          0.0016542  0.0007611   2.173 0.030345 *  
gpa          0.5274319  0.2307913   2.285 0.022825 *  
rank2       -0.3265264  0.2167527  -1.506 0.132754    
rank3       -0.7947102  0.2364447  -3.361 0.000852 ***
rank4       -0.9818197  0.2867970  -3.423 0.000683 ***&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;However, if we run the same model using the same data on SAS with PROC GENMOD,&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GENMOD data=logistic_test DESCENDING;
    CLASS rank(REF = "1");
    MODEL admit = gre gpa rank / DIST=tweedie(p=1.5);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The result is&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;Parameter . DF    Estimate   Standard Error
Intercept     1       -3.4958     1.1387
gre               1        0.0017      0.0011
gpa              1       0.5274      0.3176
......&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 23:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547769#M27352</guid>
      <dc:creator>chaog</dc:creator>
      <dc:date>2019-04-01T23:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547824#M27353</link>
      <description>&lt;P&gt;Which R module/library are you using? Is it certified by a governing body like the FDA, so you can trust it?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 07:59:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547824#M27353</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-04-02T07:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547907#M27355</link>
      <description>&lt;P&gt;It is probably a scale issue. Notice that the ratio of (R StdErr) / (SAS StdErr) is approximately the constant value 1.4(ish). You don't show all the output, but presumably this is the estimate for the Tweedie dispersion (scale) value.&amp;nbsp;Multiply your R standard errors by the dispersion estimate to get the SAS values (or divide the SAS estimates by the scale).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 14:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547907#M27355</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-04-02T14:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547921#M27357</link>
      <description>&lt;P&gt;It is not immediately clear how R's glm function estimates the Tweedie scale parameter, but it reports a scale estimate of 1.381162. This is close to the estimate you get if you use the SCALE=D option in the MODEL statement of PROC GENMOD. If you specify SCALE=1.381162 NOSCALE options in the MODEL statement in PROC GENMOD, then you get very similar standard errors. Note that GENMOD does not require you to specify the Tweedie power parameter - by default it estimates it and the scale parameter using maximum likelihood. If you just specify DIST=TWEEDIE as the only option, you get a model with log likelihood = -237.8 as compared to the log likelihood of the power=1.5 model which is -424.9.&amp;nbsp;Also, you should omit the DESCENDING option - this is only used for binary responses.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2019 15:24:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/547921#M27357</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2019-04-02T15:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/548081#M27362</link>
      <description>I read into the document and apparently PROC GENMOD use ML to estimate the scale. My question is, what is scale? I am familiar with the notation of "dispersion" and apparently, "scale" and "dispersion" are different in SAS. The following document states that "SAS works with scale" but doesn't give the definition of "scale":&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm#statug.genmod.genmodscale1" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect030.htm#statug.genmod.genmodscale1&lt;/A&gt;</description>
      <pubDate>Tue, 02 Apr 2019 23:58:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/548081#M27362</guid>
      <dc:creator>chaog</dc:creator>
      <dc:date>2019-04-02T23:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why do PROC GENMOD and glm() in R show different standard errors?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/548082#M27363</link>
      <description>&lt;P&gt;The documentation page has a table (the headers are "Distribution" and "Scale") which shows how the dispersion parameter in the exponential family&amp;nbsp;relates to the scale parameter for various distributions. A "scale parameter" is merely the parameter in the distribution that controls the variance, such as sigma for Normal and lambda for Poisson. The &lt;A href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_genmod_details01.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.genmod.genmodscale1" target="_self"&gt;density equations at the top of the page &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;express the variance in terms of the scale parameters, not the dispersion. The "estimate&amp;nbsp;of scale" in the parameter estimates table enables you to go back and forth between the two parameters.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 00:32:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-PROC-GENMOD-and-glm-in-R-show-different-standard-errors/m-p/548082#M27363</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-04-03T00:32:18Z</dc:date>
    </item>
  </channel>
</rss>

