<?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 logistic regression results differ among procedures? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-logistic-regression-results-differ-among-procedures/m-p/264873#M13964</link>
    <description>&lt;P&gt;The procedures are using different test methods, or different test statistics, as the defaults. GENMOD is using a likelihood ratio (LR) test as the default. This can be changed to a Wald test (i.e., chi-squared test statistic) with the WALD option. A chi-squared statistic is used for LR and WALD, but these are based on diffferent values. The Wald test in GENMOD is not adjusted for small sample size; that is, the WALD chi-squared is the same as an F test with infinite denominator df. LOGISTIC gives LR and Wald test statistics, but once again, is not adjusted for small (finite) sample sizes (Wald chi-squared = F with infinite denominator df). GLIMMIX uses the scaled Wald statistic (F statistic with &lt;STRONG&gt;finite&lt;/STRONG&gt; denominator df) as the default. One can get the regular chi-squared (equivalent to F with inifinite denominator df), which is still a Wald test, with the chisq option that you showed. GLIMMIX does not have a LR option for testing fixed effects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Moreover, if you add random effects to GLIMMIX, the estimation method would change from MLE to pseudo-likelihood (by default). You can get back to an approxmiate direct MLE by using method=laplace.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another confusing thing to wathc out for: in GENMOD, the default type 3 test is LR, but one still gets WALD-based SEs and CIs for the parameter estimates in the Solution table. As noted above, one can always switch to Wald type 3 tests (but still no correction for finite sample size).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Apr 2016 19:47:38 GMT</pubDate>
    <dc:creator>lvm</dc:creator>
    <dc:date>2016-04-19T19:47:38Z</dc:date>
    <item>
      <title>Why do logistic regression results differ among procedures?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-logistic-regression-results-differ-among-procedures/m-p/264840#M13963</link>
      <description>&lt;P&gt;I was running a very simplified logistic regression using Proc Logistic, Proc Genmod, and Proc Glimmix and was surprised to find that my conclusion could change depending on the procedure I used.&amp;nbsp; My sample data set and code are as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; input y n x @@;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; cards;&lt;/P&gt;
&lt;P&gt;6 8 1&amp;nbsp; 4 7 2&amp;nbsp; 4 8 3&lt;/P&gt;
&lt;P&gt;3 9 4&amp;nbsp; 3 7 5&amp;nbsp; 1&amp;nbsp;9 6&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;proc logistic data=test;&amp;nbsp;&amp;nbsp; model y/n=x;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;proc genmod data=test;&amp;nbsp;&amp;nbsp; model y/n=x / dist=binomial link=logit&amp;nbsp;type3;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;proc glimmix data=test;&amp;nbsp;&amp;nbsp; model y/n=x / dist=binomial link=logit s chisq;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the same parameter estimates and standard errors from all three procedures.&amp;nbsp; However, the p-values are different for Proc Glimmix.&amp;nbsp; They match between Logistic and Genmod (however, the type3 results in Genmod do not match the test for the paramter estiamte&amp;nbsp;- not sure why).&amp;nbsp; It seems like almost everything matches between Glimmix and the other two procedures except for the p-values.&amp;nbsp; I can get the same p-values if I add the Chisq option, but why are the p-values based on the&amp;nbsp;F different?&amp;nbsp; My conclusions could change depending on which procedure I am using.&amp;nbsp; Therefore, if I need to use Glimmix because I have random effects, I am really concerned that the results I get will not be correct.&amp;nbsp; Any insight as to why these are different would be helpful.&amp;nbsp; (I also&amp;nbsp;tried this with more comples datasets and again Glimmix differed from the other two procedure with respect&amp;nbsp;to the p-values.)&amp;nbsp; Thank you.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Sasfont" size="1"&gt;&lt;FONT face="Sasfont" size="1"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2016 16:59:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-logistic-regression-results-differ-among-procedures/m-p/264840#M13963</guid>
      <dc:creator>buhl2752</dc:creator>
      <dc:date>2016-04-19T16:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why do logistic regression results differ among procedures?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Why-do-logistic-regression-results-differ-among-procedures/m-p/264873#M13964</link>
      <description>&lt;P&gt;The procedures are using different test methods, or different test statistics, as the defaults. GENMOD is using a likelihood ratio (LR) test as the default. This can be changed to a Wald test (i.e., chi-squared test statistic) with the WALD option. A chi-squared statistic is used for LR and WALD, but these are based on diffferent values. The Wald test in GENMOD is not adjusted for small sample size; that is, the WALD chi-squared is the same as an F test with infinite denominator df. LOGISTIC gives LR and Wald test statistics, but once again, is not adjusted for small (finite) sample sizes (Wald chi-squared = F with infinite denominator df). GLIMMIX uses the scaled Wald statistic (F statistic with &lt;STRONG&gt;finite&lt;/STRONG&gt; denominator df) as the default. One can get the regular chi-squared (equivalent to F with inifinite denominator df), which is still a Wald test, with the chisq option that you showed. GLIMMIX does not have a LR option for testing fixed effects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Moreover, if you add random effects to GLIMMIX, the estimation method would change from MLE to pseudo-likelihood (by default). You can get back to an approxmiate direct MLE by using method=laplace.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another confusing thing to wathc out for: in GENMOD, the default type 3 test is LR, but one still gets WALD-based SEs and CIs for the parameter estimates in the Solution table. As noted above, one can always switch to Wald type 3 tests (but still no correction for finite sample size).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2016 19:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Why-do-logistic-regression-results-differ-among-procedures/m-p/264873#M13964</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2016-04-19T19:47:38Z</dc:date>
    </item>
  </channel>
</rss>

