<?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: 'Wrong' estimates proc logistic? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716340#M34654</link>
    <description>And this is the proc genmod:&lt;BR /&gt;&lt;BR /&gt;proc genmod data=check descending;&lt;BR /&gt;class factor/param=ref ref=first;&lt;BR /&gt;model event=factor/dist=bin link=logit;&lt;BR /&gt;estimate 'OR' factor 1/exp;&lt;BR /&gt;run;</description>
    <pubDate>Wed, 03 Feb 2021 08:35:20 GMT</pubDate>
    <dc:creator>KlaasFrankena</dc:creator>
    <dc:date>2021-02-03T08:35:20Z</dc:date>
    <item>
      <title>'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716339#M34653</link>
      <description>&lt;P&gt;I wonder why the odds ratio estimated by proc logistic differs from the one obtained from proc freq and proc genmod in the example below (SAS 9.4 TS Level 1M5). The OR's become identical when the low frequency event=0/factor=1 is set to above 20. Using logistic regression in STATA on this data gives the same OR as the one from proc freq and proc genmod. I would like to know why proc logistic gives a slightly different OR (I know exact logistic regression should be used on sparse data).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data check;&lt;BR /&gt;do i=1 to 52; event=1; factor=1; output; end;&lt;BR /&gt;do i=1 to 287; event=1; factor=0; output; end;&lt;BR /&gt;do i=1 to 1; event=0; factor=1; output; end;&lt;BR /&gt;do i=1 to 385; event=0; factor=0; output; end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc logistic data=check descending;&lt;BR /&gt;class factor/param=ref ref=first;&lt;BR /&gt;model event=factor;&lt;BR /&gt;run;&lt;BR /&gt;proc freq data=check;&lt;BR /&gt;tables event*factor/cmh;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 08:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716339#M34653</guid>
      <dc:creator>KlaasFrankena</dc:creator>
      <dc:date>2021-02-03T08:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716340#M34654</link>
      <description>And this is the proc genmod:&lt;BR /&gt;&lt;BR /&gt;proc genmod data=check descending;&lt;BR /&gt;class factor/param=ref ref=first;&lt;BR /&gt;model event=factor/dist=bin link=logit;&lt;BR /&gt;estimate 'OR' factor 1/exp;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 03 Feb 2021 08:35:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716340#M34654</guid>
      <dc:creator>KlaasFrankena</dc:creator>
      <dc:date>2021-02-03T08:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716401#M34656</link>
      <description>Very interesting . When you using PROC HPLOGISTIC , you could get right coefficient estimator  4.245 .&lt;BR /&gt;&lt;BR /&gt;proc hplogistic data=check ;&lt;BR /&gt;model event(event='1')=factor ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;I think the reason proc hplogistic is using &lt;BR /&gt;Optimization Technique Newton-Raphson with Ridging &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;While proc logistic &lt;BR /&gt;proc logistic data=check ;&lt;BR /&gt;model event(event='1')=factor ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;is using Optimization Technique Fisher's scoring .&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716401#M34656</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-03T12:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716411#M34658</link>
      <description>&lt;P&gt;Thanks! One can specify TECH=Newton as option in proc logistic's model statement, but it gives the same output as Fisher scoring. So, you really need 'Newton with ridging' to come to identical estimates. Good to know when small frequencies are involved!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716411#M34658</guid>
      <dc:creator>KlaasFrankena</dc:creator>
      <dc:date>2021-02-03T12:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716413#M34659</link>
      <description>Yeah. You are right. That is the reason you need PROC HPLOGISTIC to conduct the OR you need .</description>
      <pubDate>Wed, 03 Feb 2021 13:08:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716413#M34659</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-03T13:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716463#M34660</link>
      <description>&lt;P&gt;If you add the ITPRINT option, you will see that the gradients are small but not extremely close to zero which would indicate proper convergence. You could be a little suspicious of the convergence because of the slightly large parameter estimate. If you then use a different convergence criterion by specifying GCONV=0 XCONV=1e-8, then the gradients are extremely small and the odds ratio estimate is the same as from PROC FREQ. Of course, using a different procedure similarly changes the iterative algorithm and could also provide more complete convergence.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 14:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716463#M34660</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-02-03T14:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: 'Wrong' estimates proc logistic?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716518#M34662</link>
      <description>&lt;P&gt;Thanks, very helpful solution as well.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 16:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Wrong-estimates-proc-logistic/m-p/716518#M34662</guid>
      <dc:creator>KlaasFrankena</dc:creator>
      <dc:date>2021-02-03T16:18:22Z</dc:date>
    </item>
  </channel>
</rss>

