<?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: Proc logistic with error : All observations have the same response in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964160#M48350</link>
    <description>As StatDave said, you also need to check independent varibles missing value,&lt;BR /&gt;if any of them is mssing,sas will delete the whole row/obs.&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;if nmiss(of&lt;BR /&gt;W_equipment,&lt;BR /&gt;W_Ever_31Plus_DPD,&lt;BR /&gt;W_TIB_Month,&lt;BR /&gt;W_PG1_VantageScore,&lt;BR /&gt;W_SBRI_Lease_Score,&lt;BR /&gt;W_PG1_InquiriesDuringLast6Months,&lt;BR /&gt;W_Months_Aged,&lt;BR /&gt;weight&lt;BR /&gt;)  ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Check in HAVE data ,if BAD has only one level/value .</description>
    <pubDate>Sat, 12 Apr 2025 07:24:13 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2025-04-12T07:24:13Z</dc:date>
    <item>
      <title>Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964144#M48345</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am getting an error when running proc logistic as follows:&amp;nbsp;&lt;SPAN&gt;All observations have the same response. No statistics are computed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I know that my binary(0/1) response variable (bad) does NOT have the same value for observations in the data. I can't figure out why I am getting this error. The distribution of bads in the data is roughly 40% with value 1 and 60% with value 0. Any help is much appreciated. The code I am running is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc logistic data= train /*model_score_data(where=(selected=1))*/ descending /*outmodel=train_model*/;&lt;BR /&gt;model bad =&lt;BR /&gt;W_equipment&lt;BR /&gt;W_Ever_31Plus_DPD&lt;BR /&gt;W_TIB_Month&lt;BR /&gt;W_PG1_VantageScore&lt;BR /&gt;W_SBRI_Lease_Score&lt;BR /&gt;W_PG1_InquiriesDuringLast6Months&lt;BR /&gt;W_Months_Aged&lt;BR /&gt;/ selection=forward sle=0.1 ctable pprob=(0.1 to 0.5 by 0.05) lackfit &lt;BR /&gt;outroc=train_roc clodds=pl link=logit ;&lt;BR /&gt;weight weights;&lt;BR /&gt;output out=train_scored_data predicted=Pred_prob predprobs=individual&lt;BR /&gt;reschi=res_chi resdev=res_dev h=levrg difdev=dif_dev ;&lt;BR /&gt;*score data = model_score_data(where=(selected=0)) out=test_scored_data ; &lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 21:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964144#M48345</guid>
      <dc:creator>jitb</dc:creator>
      <dc:date>2025-04-11T21:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964145#M48346</link>
      <description>&lt;P&gt;This error almost always occurs because missing or invalid values in the predictors, weights, or other variables involved in the model cause the exclusion of enough observations so that the remaining observations all have the same response level. Note that observations can be excluded as a result of having missing or invalid values in different variables, so checking each variable separately is not sufficient. So, one observation could be omitted because it has an invalid weight (zero or negative) and another could be omitted because it is missing on one predictor. Note that as more variables get added to the model during the model selection process, it is possible that more observations will be omitted.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Apr 2025 21:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964145#M48346</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2025-04-11T21:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964146#M48347</link>
      <description>Thank you for your observation. Yes, I need to check if I have any missing&lt;BR /&gt;or invalid values in the weights assigned. Thanks again for pointing this&lt;BR /&gt;out!&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2025 22:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964146#M48347</guid>
      <dc:creator>jitb</dc:creator>
      <dc:date>2025-04-11T22:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964160#M48350</link>
      <description>As StatDave said, you also need to check independent varibles missing value,&lt;BR /&gt;if any of them is mssing,sas will delete the whole row/obs.&lt;BR /&gt;&lt;BR /&gt;data have;&lt;BR /&gt;if nmiss(of&lt;BR /&gt;W_equipment,&lt;BR /&gt;W_Ever_31Plus_DPD,&lt;BR /&gt;W_TIB_Month,&lt;BR /&gt;W_PG1_VantageScore,&lt;BR /&gt;W_SBRI_Lease_Score,&lt;BR /&gt;W_PG1_InquiriesDuringLast6Months,&lt;BR /&gt;W_Months_Aged,&lt;BR /&gt;weight&lt;BR /&gt;)  ;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Check in HAVE data ,if BAD has only one level/value .</description>
      <pubDate>Sat, 12 Apr 2025 07:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964160#M48350</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-04-12T07:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964163#M48351</link>
      <description>Thanks for the nice and simple code of filtering the observations with certain variables missing in a dataset. I used to create indicator variables for values missing in given variables and use the WHERE statement to select the ones with indicator variable equal one to filter them out. Your code is much simpler.</description>
      <pubDate>Sat, 12 Apr 2025 08:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964163#M48351</guid>
      <dc:creator>Season</dc:creator>
      <dc:date>2025-04-12T08:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc logistic with error : All observations have the same response</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964174#M48352</link>
      <description>&lt;P&gt;Thank you...this code is very helpful. The problem was I had missing weights.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Apr 2025 22:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-logistic-with-error-All-observations-have-the-same-response/m-p/964174#M48352</guid>
      <dc:creator>jitb</dc:creator>
      <dc:date>2025-04-12T22:32:04Z</dc:date>
    </item>
  </channel>
</rss>

