<?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 quasi-complete separation in Python Not in SAS? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918331#M45571</link>
    <description>&lt;P&gt;&lt;FONT size="3"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I am constructing a binary logistic regression model using 'proc logistic' in SAS, and the output appears to be error-free with no warning messages. However, when I replicate the same dataset and variables in Python using statsmodels, I encounter an error message indicating possible quasi-complete separation: 'A fraction of 0.20 of observations can be perfectly predicted. This might indicate quasi-separation, and in such cases, some parameters may not be identified.' In light of this discrepancy, I am uncertain about which set of results to trust—those from SAS or from Python. Thank you for any guidance you can provide.&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 21:29:04 GMT</pubDate>
    <dc:creator>lionking19063</dc:creator>
    <dc:date>2024-02-28T21:29:04Z</dc:date>
    <item>
      <title>quasi-complete separation in Python Not in SAS?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918331#M45571</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;I am constructing a binary logistic regression model using 'proc logistic' in SAS, and the output appears to be error-free with no warning messages. However, when I replicate the same dataset and variables in Python using statsmodels, I encounter an error message indicating possible quasi-complete separation: 'A fraction of 0.20 of observations can be perfectly predicted. This might indicate quasi-separation, and in such cases, some parameters may not be identified.' In light of this discrepancy, I am uncertain about which set of results to trust—those from SAS or from Python. Thank you for any guidance you can provide.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 21:29:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918331#M45571</guid>
      <dc:creator>lionking19063</dc:creator>
      <dc:date>2024-02-28T21:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: quasi-complete separation in Python Not in SAS?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918343#M45572</link>
      <description>&lt;P&gt;Data and the SAS code would be needed to tell about the SAS side of things.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a minimum the Python code would be needed as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any two programs are likely to have one or more defaults or options that affect such interpretation and without sufficient details we would be guessing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is that "Possible quasi-complete separation" actually an &lt;STRONG&gt;error&lt;/STRONG&gt; message? That sounds&amp;nbsp; more like a WARNING, which means you need to investigate your data for accuracy and your code for correct use of that data. I would expect an ERROR to yield no output.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918343#M45572</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-02-28T23:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: quasi-complete separation in Python Not in SAS?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918344#M45573</link>
      <description>&lt;P&gt;How do the parameters compare? Not sure if this is the case, but some packages in python standardize the data before doing the regression, SAS does not. Also, what parameterization method is being used if categorical variables are involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's likely a reason this is occurring but there isn't enough information to say why.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just running 'logistic regression' in each application is not necessarily running equivalent models.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74349"&gt;@lionking19063&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;I am constructing a binary logistic regression model using 'proc logistic' in SAS, and the output appears to be error-free with no warning messages. However, when I replicate the same dataset and variables in Python using statsmodels, I encounter an error message indicating possible quasi-complete separation: 'A fraction of 0.20 of observations can be perfectly predicted. This might indicate quasi-separation, and in such cases, some parameters may not be identified.' In light of this discrepancy, I am uncertain about which set of results to trust—those from SAS or from Python. Thank you for any guidance you can provide.&lt;/FONT&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:28:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/quasi-complete-separation-in-Python-Not-in-SAS/m-p/918344#M45573</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2024-02-28T23:28:17Z</dc:date>
    </item>
  </channel>
</rss>

