<?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 question in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69520#M3363</link>
    <description>Yes, you can obtain predicted values from the GLIMMIX procedure.  However, it is probably not quite as easy to write the code in GLIMMIX because you need to write an ESTIMATE statement for every subject.  Thus, you would need code like the following:&lt;BR /&gt;
&lt;BR /&gt;
ods output Estimates=Predictions;&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;class q03;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;model q327 = q103r / dist=binary;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;random q03;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 1st subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 2nd subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 10th subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 0 0 0 0 0 0 0 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 20th subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Note that each estimate statement specifies the same linear combination of the fixed effects but picks up a different column of the random effect q03.  We need a separate ESTIMATE statement for each level of q03.  In addition, in order to predict the expected probability value (rather than eta), we need the ILINK option on each ESTIMATE statement.&lt;BR /&gt;
&lt;BR /&gt;
Note, too, the use of the vertical bar (|) before the random effect q03 in ESTIMATE statement.  The vertical bar indicates that the terms which follow are found in the random effects structure.&lt;BR /&gt;
&lt;BR /&gt;
Additionally, it should be observed that you will not get the same results out of the ESTIMATE statement if you specify the RANDOM statement as&lt;BR /&gt;
&lt;BR /&gt;
random intercept / subject=r03;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The GLIMMIX procedure makes model specification much easier than does the NLMIXED procedure.  However, obtaining predicted values conditional on levels of the random effects is considerably easier in NLMIXED.</description>
    <pubDate>Fri, 19 Mar 2010 23:41:53 GMT</pubDate>
    <dc:creator>Dale</dc:creator>
    <dc:date>2010-03-19T23:41:53Z</dc:date>
    <item>
      <title>proc glimmix question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69519#M3362</link>
      <description>Dear friends,&lt;BR /&gt;
After running proc nlmixed, I can make predictions (PREDICT_1) using the entire estimated equation (along with the random error term u) and conduct some post-estimation analyses as in the example below. Is there a way of doing this in PROC GLIMMIX and how would I do it. Thank you for any help you can give me.&lt;BR /&gt;
&lt;BR /&gt;
proc nlmixed data=xxx;                        &lt;BR /&gt;
&lt;BR /&gt;
eta1=theta + b_Q103R*q103r  + u;          &lt;BR /&gt;
&lt;BR /&gt;
PREDICT_1=THETA + B_Q103R*59 + U;*******&lt;BR /&gt;
pq103r1=exp(predict_1)/(1+EXP(predict_1));*****&lt;BR /&gt;
&lt;BR /&gt;
p_q327=exp(ETA1)/(1+EXP(ETA1));           &lt;BR /&gt;
LL=(p_q327);                              &lt;BR /&gt;
model q327~binary(ll);                    &lt;BR /&gt;
random u ~ normal(0,s2u) subject=q03;  &lt;BR /&gt;
&lt;BR /&gt;
predict pq103r1 out=out_pq103r1;  ******&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 19 Mar 2010 05:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69519#M3362</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-19T05:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc glimmix question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69520#M3363</link>
      <description>Yes, you can obtain predicted values from the GLIMMIX procedure.  However, it is probably not quite as easy to write the code in GLIMMIX because you need to write an ESTIMATE statement for every subject.  Thus, you would need code like the following:&lt;BR /&gt;
&lt;BR /&gt;
ods output Estimates=Predictions;&lt;BR /&gt;
proc glimmix data=xxx;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;class q03;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;model q327 = q103r / dist=binary;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;random q03;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 1st subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 2nd subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 10th subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 0 0 0 0 0 0 0 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;estimate "Prediction for 20th subject"&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;intercept 1&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;q103r 59&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;| q03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 /&lt;BR /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ilink;&lt;BR /&gt;
...&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Note that each estimate statement specifies the same linear combination of the fixed effects but picks up a different column of the random effect q03.  We need a separate ESTIMATE statement for each level of q03.  In addition, in order to predict the expected probability value (rather than eta), we need the ILINK option on each ESTIMATE statement.&lt;BR /&gt;
&lt;BR /&gt;
Note, too, the use of the vertical bar (|) before the random effect q03 in ESTIMATE statement.  The vertical bar indicates that the terms which follow are found in the random effects structure.&lt;BR /&gt;
&lt;BR /&gt;
Additionally, it should be observed that you will not get the same results out of the ESTIMATE statement if you specify the RANDOM statement as&lt;BR /&gt;
&lt;BR /&gt;
random intercept / subject=r03;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The GLIMMIX procedure makes model specification much easier than does the NLMIXED procedure.  However, obtaining predicted values conditional on levels of the random effects is considerably easier in NLMIXED.</description>
      <pubDate>Fri, 19 Mar 2010 23:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69520#M3363</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-03-19T23:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc glimmix question</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69521#M3364</link>
      <description>Hi Dale,&lt;BR /&gt;
Thank you very much for your prompt response. Not quite the answer I was hoping for!, but at least I can give up on that  direction. Thank you again.&lt;BR /&gt;
K</description>
      <pubDate>Sat, 20 Mar 2010 09:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-glimmix-question/m-p/69521#M3364</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-20T09:18:19Z</dc:date>
    </item>
  </channel>
</rss>

