<?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: Retrieving probabilities from ordered multinomial regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618961#M181639</link>
    <description>&lt;P&gt;I believe the problem is that you are using the UNEQUALSLOPES option. The doc for the LOGISTIC PROCEDURE says,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"The STORE statement is not available for models created with the &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.modelstmtlink" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.modelstmtlink"&gt;LINK=ALOGIT&lt;/A&gt;&lt;SPAN&gt; option, the &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.logisticequal" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.logisticequal"&gt;EQUALSLOPES&lt;/A&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.logisticunequal" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.logisticunequal"&gt;UNEQUALSLOPES&lt;/A&gt;&lt;/FONT&gt;&lt;SPAN&gt; options, a &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax34.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax34.htm"&gt;STRATA&lt;/A&gt;&lt;SPAN&gt; statement, or an &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax15.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax15.htm"&gt;EXACT&lt;/A&gt;&lt;SPAN&gt; statement."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can work around the problem by removing the option.&amp;nbsp; You can create a separate PROC LOGISTIC call that performs the unequal slopes analysis but does not contain the STORE statement.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2020 21:07:08 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2020-01-21T21:07:08Z</dc:date>
    <item>
      <title>Retrieving probabilities from ordered multinomial regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618726#M181545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a dataset like the one below, where Lag_level and Level can take any value from {0,1,2,3,4} and LOS_category takes values from set&amp;nbsp; {1,2,3,4}.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lag_level&amp;nbsp; Level&amp;nbsp; LOS_category&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;/P&gt;&lt;P&gt;I am trying to estimate the probability of Level as the dependent variable and independent variables are&amp;nbsp;&amp;nbsp;Lag_level&amp;nbsp; and LOS_category. I used ordered multinomial logit regression with the following code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data =have;
class lag_level (param = ref ref="4") LOS_category(param = ref ref="4");
model Level (descending)=lag_level  LOS_category /unequalslopes=(lag_level);
output out=outreg  predicted=p1;
store  out=Level_transition;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now I want to predict the (individual) probabilities (as opposed with cumulative probabilities) for a test dataset like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test2;
   input lag_level  LOS_category;
   datalines;
0 1
1 1
2 1
3 1
4 1
0 3
1 3
2 4
3 3
4 2
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried to use proc plm and restore the model as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc plm restore=level_transition;
   score data=test2 out=testout2 predicted / ilink;
run;
proc print data=testout2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But then I received an error "ERROR: The file WORK.LEVEL_TRANSITION does not exist or it is not a valid item store." Because these procedure works for standard logistic regression, I was wondering if anybody can help with this cumulative multinomial one.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 00:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618726#M181545</guid>
      <dc:creator>Bright</dc:creator>
      <dc:date>2020-01-21T00:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving probabilities from ordered multinomial regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618961#M181639</link>
      <description>&lt;P&gt;I believe the problem is that you are using the UNEQUALSLOPES option. The doc for the LOGISTIC PROCEDURE says,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"The STORE statement is not available for models created with the &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.modelstmtlink" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.modelstmtlink"&gt;LINK=ALOGIT&lt;/A&gt;&lt;SPAN&gt; option, the &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.logisticequal" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.logisticequal"&gt;EQUALSLOPES&lt;/A&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax22.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en#statug.logistic.logisticunequal" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax22.htm#statug.logistic.logisticunequal"&gt;UNEQUALSLOPES&lt;/A&gt;&lt;/FONT&gt;&lt;SPAN&gt; options, a &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax34.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax34.htm"&gt;STRATA&lt;/A&gt;&lt;SPAN&gt; statement, or an &lt;/SPAN&gt;&lt;A tabindex="0" href="https://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_logistic_syntax15.htm&amp;amp;docsetVersion=15.1&amp;amp;locale=en" data-docset-version="15.1" data-docset-id="statug" data-original-href="statug_logistic_syntax15.htm"&gt;EXACT&lt;/A&gt;&lt;SPAN&gt; statement."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can work around the problem by removing the option.&amp;nbsp; You can create a separate PROC LOGISTIC call that performs the unequal slopes analysis but does not contain the STORE statement.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 21:07:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618961#M181639</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-01-21T21:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving probabilities from ordered multinomial regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618968#M181642</link>
      <description>&lt;P&gt;Thanks for the reply. So do you know any other way that I can estimate probabilities?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 21:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618968#M181642</guid>
      <dc:creator>Bright</dc:creator>
      <dc:date>2020-01-21T21:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving probabilities from ordered multinomial regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618975#M181645</link>
      <description>&lt;P&gt;If you want to do it in a single call, you can &lt;A href="https://blogs.sas.com/content/iml/2014/02/19/scoring-a-regression-model-in-sas.html" target="_self"&gt;use the SCORE statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc logistic data =Have;
class lag_level (param = ref ref="4") LOS_category(param = ref ref="4");
model Level (descending)=lag_level  LOS_category /unequalslopes=(lag_level);
output out=outreg  predicted=p1;
SCORE data=test2 out=pred;
run;

proc print data=pred;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jan 2020 21:36:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618975#M181645</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2020-01-21T21:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving probabilities from ordered multinomial regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618976#M181646</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 21:49:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Retrieving-probabilities-from-ordered-multinomial-regression/m-p/618976#M181646</guid>
      <dc:creator>Bright</dc:creator>
      <dc:date>2020-01-21T21:49:28Z</dc:date>
    </item>
  </channel>
</rss>

