<?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: Issue with logistic regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890938#M44150</link>
    <description>&lt;P&gt;Thank you very much StatDave! I will apply the steps you suggested and revert. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 04:11:01 GMT</pubDate>
    <dc:creator>KKIND</dc:creator>
    <dc:date>2023-08-25T04:11:01Z</dc:date>
    <item>
      <title>Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889991#M44112</link>
      <description>&lt;P&gt;Hi, I am running proc logistic and I get the following error.&lt;/P&gt;&lt;P&gt;ERROR: All observations have the same response. No statistics are computed.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I resolve this issue. Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889991#M44112</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889992#M44113</link>
      <description>&lt;P&gt;If all observations have the same response, it is impossible to fit any type of model to it. Your data is the problem, you cannot fit a logistic (or any other) regression model to this data.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889992#M44113</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-18T21:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889994#M44114</link>
      <description>Hello and thank you for your reply. My data has several variables with different responses so I don't understand how this issue can crop up. When I am running the proc logistic program using the DV and the primary IV, it works. It is only when I add other covariates that this error happens.&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889994#M44114</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889995#M44115</link>
      <description>Hello and thank you for your reply. My data has several variables with different responses so I don't understand how this issue can crop up. When I am running the proc logistic program using the DV and the primary IV, it works. It is only when I add other covariates that this error happens.</description>
      <pubDate>Fri, 18 Aug 2023 21:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889995#M44115</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889996#M44116</link>
      <description>&lt;P&gt;Please show us the ENTIRE log for this PROC LOGISTIC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please show us part of the data so we can see that the response variable doesn't always have the exact same values. (A screen capture is fine, use the "insert photos" icon to include your screen capture in your reply; do not attach files)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889996#M44116</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-18T21:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889998#M44117</link>
      <description>Her you go. Thanks!&lt;BR /&gt;&lt;BR /&gt;806 proc logistic data=NRD.nrd_2016_amirecat_readmit_only;&lt;BR /&gt;807 class aweekend (ref = "0") aprdrg_risk_mortality (ref = "1") aprdrg_severity (ref = "1") died (ref = "0") elective (ref = "0") female (ref =&lt;BR /&gt;807! "0") pay1recat (ref = "1") pl_NCHSrecat (ref = "1") zipinc_qrtl (ref = "1") hosp_bedsize (ref = "1") H_contrl (ref = "1") hosp_urcat4recat&lt;BR /&gt;807! (ref = "1") hosp_ur_teach (ref = "0") / param = ref;&lt;BR /&gt;808 model readmit&lt;BR /&gt;809 (event="1") = pay1recat age totchg readmitchg aweekend died dispuniform elective female los i10_ndx i10_npr pl_nchsrecat zipinc_qrtl&lt;BR /&gt;809! hosp_bedsize h_contrl hosp_urcat4recat hosp_ur_teach aprdrg_risk_mortality aprdrg_severity;&lt;BR /&gt;810 run;&lt;BR /&gt;&lt;BR /&gt;ERROR: All observations have the same response. No statistics are computed.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 313178 observations read from the data set NRD.NRD_2016_AMIRECAT_READMIT_ONLY.&lt;BR /&gt;NOTE: PROCEDURE LOGISTIC used (Total process time):&lt;BR /&gt;real time 0.27 seconds&lt;BR /&gt;cpu time 0.28 seconds&lt;BR /&gt;&lt;BR /&gt;Sorry I cannot share any data as I am bound by the DUA I have signed with HCUP.&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889998#M44117</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889999#M44118</link>
      <description>&lt;P&gt;Ok, when SAS says something is true, and the user says it is not true, I believe SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It may be that once observations with missing X values are removed by PROC LOGISTIC, the error in the log becomes correct. Please look for that. Beyond that, I cannot help since I can't see your data.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/889999#M44118</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-08-18T21:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890000#M44119</link>
      <description>Okay, thank you PaigeMiller! Appreciate your time.</description>
      <pubDate>Fri, 18 Aug 2023 21:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890000#M44119</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890001#M44120</link>
      <description>Does your data have missing values? SAS removes missing values row wise, so if one variable has a missing value, that row is excluded from the analysis. One possibility is that either one variable is entirely missing or the combination of variables results in a single outcome.  Run a proc freq of the data to see the combinations and outcomes with missing values.</description>
      <pubDate>Fri, 18 Aug 2023 21:31:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890001#M44120</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-08-18T21:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890002#M44121</link>
      <description>Hi Reeza, YEs, my data does have missing values. When I run the proc freq, some categorical variables show 12,956 missing values while others show 13,192 missing values.</description>
      <pubDate>Fri, 18 Aug 2023 21:36:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890002#M44121</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890003#M44122</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=;
table model readmit*pay1recat*age*totchg*readmitchg*aweekend*died *dispuniform*elective*female*los i10_ndx*i10_npr*pl_nchsrecat*zipinc_qrtl
*hosp_bedsize*h_contrl*hosp_urcat4recat*hosp_ur_teach*aprdrg_risk_mortality *aprdrg_severity / listwise out=check;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Examine that output for any patterns or better yet, look at the missing pattern graphic/table from PROC MI.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/11/29/visualize-patterns-missing-values.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/11/29/visualize-patterns-missing-values.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 21:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890003#M44122</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-08-18T21:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890007#M44123</link>
      <description>Thank you very much Reeza! I will do as advised and revert.</description>
      <pubDate>Fri, 18 Aug 2023 21:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890007#M44123</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-18T21:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890933#M44147</link>
      <description>&lt;P&gt;The error is undoubtedly due to every observation in your data set containing a missing value in one or more of the variables you specified in your PROC LOGISTIC step. As mentioned, to&amp;nbsp;see how many observations are omitted due to missing values on one or more variables involved in the model, list all variables specified in the modeling procedure (response, predictors, weight, freq, offset, and so on) in the VAR statement in the PROC MI step below. Note that you should never include any variables in the CLASS statement of PROC LOGISTIC that are not specified elsewhere in the procedure. The results include a table that shows each pattern of missing values found in the data and the number of observations with each pattern. In the table, X means a value is present, O or . means it is missing. Only those observations in Group 1, with no missing values in any variable, can be used.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=&amp;lt;your_data&amp;gt; nimpute=0 displaypattern=nomeans;
class &amp;lt;all CLASS variables&amp;gt;;
var &amp;lt;all variables&amp;gt;;
fcs logistic;
ods select MissPattern;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the input data is constructed to only contain the variables specified in PROC LOGISTIC, then this code can be used.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mi data=&amp;lt;your_data&amp;gt; nimpute=0 displaypattern=nomeans;
class _character_;
var _all_;
fcs logistic;
ods select MissPattern;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Aug 2023 01:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890933#M44147</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-08-25T01:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890936#M44149</link>
      <description>&lt;P&gt;If the outcome variable is named READMIT and your input dataset is named READMIT_ONLY then I think I can see why all of the outcomes have the same value.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 02:25:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890936#M44149</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-25T02:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890938#M44150</link>
      <description>&lt;P&gt;Thank you very much StatDave! I will apply the steps you suggested and revert. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 04:11:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Issue-with-logistic-regression/m-p/890938#M44150</guid>
      <dc:creator>KKIND</dc:creator>
      <dc:date>2023-08-25T04:11:01Z</dc:date>
    </item>
  </channel>
</rss>

