<?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: multinomial logistic regression in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/multinomial-logistic-regression/m-p/724287#M35106</link>
    <description>&lt;P&gt;The Surveylogistic code you specify is appropriate for fitting multinomial logistic regression with domain and survey design structure ( Design: strata, cluster and survey weight).&lt;/P&gt;
&lt;P&gt;You could also include LSMeans and LSMESTIMATE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because the survey data analysis is design specific, and used in case of finite population, model based fit statistics, assumption checks are irrelevant. You could perform exploratory graphical analysis on Pearson residual for model specification error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Mar 2021 18:18:51 GMT</pubDate>
    <dc:creator>gcjfernandez</dc:creator>
    <dc:date>2021-03-07T18:18:51Z</dc:date>
    <item>
      <title>multinomial logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/multinomial-logistic-regression/m-p/719948#M34847</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to run a&amp;nbsp;multinomial logistic regression&amp;nbsp;&lt;SPAN&gt;for sample survey data. The code is below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have two questions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. is this the right code for the&amp;nbsp;multinomial logistic regression?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. How to do the diagnostics? Below is my code using Pearson residuals, but I&amp;nbsp; am not sure it is right or not. (In addition, Does proc surveylogistic statement have goodness of fit test option? I did not find it, but please correct me if i am wrong ) Do I need to do any other diagnostic tests?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;proc surveylogistic data=nh.diseases nomcar;&lt;/DIV&gt;
&lt;DIV&gt;class cluster age gender PIR SDDSRVYR race/ param=glm;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; strata SDMVSTRA;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; cluster SDMVPSU;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; weight glucwt4yr;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;domain eligible;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;model BMI_outcome= age gender PIR SDDSRVYR race&amp;nbsp; EIEER totalcounts cluster/vadjust=none link=glogit RSQUARE;&lt;/DIV&gt;
&lt;DIV&gt;output out=res_o predicted=prob_o; /*output the predicted probability*/&lt;/DIV&gt;
&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sql&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;create table&lt;SPAN class="s1"&gt; res2_o &lt;/SPAN&gt;as&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;select&lt;/SPAN&gt; prob_o, BMI_outcome, glucwt4yr &lt;SPAN class="s2"&gt;from&lt;/SPAN&gt; res_o &lt;SPAN class="s2"&gt;where&lt;/SPAN&gt; prob_o is &lt;SPAN class="s2"&gt;not&lt;/SPAN&gt; missing;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p4"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; res3_o;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;set&lt;/SPAN&gt; res2_o;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s2"&gt;if&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; BMI_outcome=&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;then&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; y_o = &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;*** y=1 means that participants are obesity ;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s2"&gt;else&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;if&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; BMI_outcome=&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;then&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; y_o = &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;*** y=2 means that participants are overweight ;&lt;/P&gt;
&lt;P class="p5"&gt;&lt;SPAN class="s2"&gt;else&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; y_o=&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;*** y=2 means that participants are normal weight ;&lt;/P&gt;
&lt;P class="p3"&gt;pearson_o = sqrt(glucwt4yr)*(y_o-prob_o)/sqrt(prob_o*(&lt;SPAN class="s4"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;-prob_o)); &lt;SPAN class="s5"&gt;/*by formula*/&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p4"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p5"&gt;/* QQ plot */&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;univariate&lt;/STRONG&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;=res3_o &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;normal&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;var&lt;/SPAN&gt; pearson_o;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="s2"&gt;qqplot&lt;/SPAN&gt; pearson_o/&lt;SPAN class="s2"&gt;normal&lt;/SPAN&gt;(&lt;SPAN class="s2"&gt;mu&lt;/SPAN&gt;=est &lt;SPAN class="s2"&gt;sigma&lt;/SPAN&gt;=est);&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 17 Feb 2021 15:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/multinomial-logistic-regression/m-p/719948#M34847</guid>
      <dc:creator>knighsson</dc:creator>
      <dc:date>2021-02-17T15:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: multinomial logistic regression</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/multinomial-logistic-regression/m-p/724287#M35106</link>
      <description>&lt;P&gt;The Surveylogistic code you specify is appropriate for fitting multinomial logistic regression with domain and survey design structure ( Design: strata, cluster and survey weight).&lt;/P&gt;
&lt;P&gt;You could also include LSMeans and LSMESTIMATE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because the survey data analysis is design specific, and used in case of finite population, model based fit statistics, assumption checks are irrelevant. You could perform exploratory graphical analysis on Pearson residual for model specification error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 18:18:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/multinomial-logistic-regression/m-p/724287#M35106</guid>
      <dc:creator>gcjfernandez</dc:creator>
      <dc:date>2021-03-07T18:18:51Z</dc:date>
    </item>
  </channel>
</rss>

