<?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 GLIMMIX model both dichotomous and continuous independent variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879313#M347387</link>
    <description>&lt;P&gt;Your formula is wrong. For each observation that you want a prediction, you want to use the values of the independent variables, which you are not doing. See Wikipedia or any textbook for the formula to predict: &lt;A href="https://en.wikipedia.org/wiki/Multinomial_logistic_regression" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Multinomial_logistic_regression&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to predict the probability of passing is to use GLIMMIX, use the OUTPUT statement to have SAS compute the predicted probabilities. &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax19.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax19.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2023 10:08:48 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-06-06T10:08:48Z</dc:date>
    <item>
      <title>PROC GLIMMIX model both dichotomous and continuous independent variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879288#M347375</link>
      <description>&lt;P&gt;I am trying to model the data using a two-level model. Student nested in school. My dependent variable "pass" is dichotomously coded (1, 0). My&amp;nbsp; independent variable includes both dichotomously coded variable first and status (1, 0) and continuous variable "practice score"&amp;nbsp; as below&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLIMMIX
DATA=pred METHOD=LAPLACE NOCLPRINT;
CLASS SCHOOLNUM;
MODEL PASS (EVENT="1")=first practice_score status/CL DIST=BINARY LINK=LOGIT SOLUTION;
RANDOM INTERCEPT/ SUBJECT=SCHOOLNUM S CL TYPE=VC;
COVTEST /WALD;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Based on the fixed effects estimates as in the picture below, the probability of pass for first=1, status=1, is exp(-5.7755+0.7758+0.00872461.1849)/(1+exp(-5.7755+0.7758+0.008724+1.1849))=0.02175, which is too low from expected.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="superbug_1-1685993623210.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84743i22BFC7F8E63DFA2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="superbug_1-1685993623210.png" alt="superbug_1-1685993623210.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where was wrong with my SAS code above? Any help would be much appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 19:38:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879288#M347375</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2023-06-05T19:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX model both dichotomous and continuous independent variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879313#M347387</link>
      <description>&lt;P&gt;Your formula is wrong. For each observation that you want a prediction, you want to use the values of the independent variables, which you are not doing. See Wikipedia or any textbook for the formula to predict: &lt;A href="https://en.wikipedia.org/wiki/Multinomial_logistic_regression" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Multinomial_logistic_regression&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to predict the probability of passing is to use GLIMMIX, use the OUTPUT statement to have SAS compute the predicted probabilities. &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax19.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_glimmix_syntax19.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 10:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879313#M347387</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-06T10:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX model both dichotomous and continuous independent variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879316#M347390</link>
      <description>&lt;P&gt;The variable names and the values first=1 and status=1 make me wonder whether the FIRST and STATUS variables are binary classification variables? If so, you should add them to the CLASS statement.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 10:52:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879316#M347390</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-06-06T10:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX model both dichotomous and continuous independent variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879447#M347425</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 20:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-GLIMMIX-model-both-dichotomous-and-continuous-independent/m-p/879447#M347425</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2023-06-06T20:48:02Z</dc:date>
    </item>
  </channel>
</rss>

