<?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 proc plm for mixed model in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917394#M45525</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a question about plotting a figure for a mixed model. Time is a categorical variable, the outcome is a score, and the covariate is the site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = test&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; METHOD = REML COVTEST ;&lt;BR /&gt;CLASS id&amp;nbsp; &amp;nbsp; site&amp;nbsp; &amp;nbsp; &amp;nbsp; time_dichotomous_number(ref="1");&lt;BR /&gt;MODEL Score =time_dichotomous_number &amp;nbsp; &amp;nbsp; site&amp;nbsp; &amp;nbsp;time_dichotomous_number*site/ SOLUTION OUTPRED=PREDDATA;&lt;BR /&gt;RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeatedtime_dichotomous_number / type=ar(1) sub=id;&lt;BR /&gt;store out=MixedModel;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;proc plm restore=MixedModel;&lt;BR /&gt;effectplot interaction (x=site&amp;nbsp; &amp;nbsp;sliceby=time_dichotomous_number) / clm connect;&lt;BR /&gt;effectplot interaction (x=time_dichotomous_number sliceby=site) / clm connect;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-02-22 at 11.23.14.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94007iB5014ECE50FEAF56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2024-02-22 at 11.23.14.png" alt="Screen Shot 2024-02-22 at 11.23.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regardless of how I label the categorical time variable, whether it's named 1-7, using letters (a, b, c, d...), or with a space before the letter, the figure consistently put time 1 at the end (Time 1 is the reference group when running the mixed model). Does anyone know how to position time 1 before time 2? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, on the y-axis, it is labeled as "linear predictor." Is this the mean predicted value generated from the mixed model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 16:32:50 GMT</pubDate>
    <dc:creator>GiaLee</dc:creator>
    <dc:date>2024-02-22T16:32:50Z</dc:date>
    <item>
      <title>proc plm for mixed model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917394#M45525</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a question about plotting a figure for a mixed model. Time is a categorical variable, the outcome is a score, and the covariate is the site.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;PROC MIXED DATA = test&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; METHOD = REML COVTEST ;&lt;BR /&gt;CLASS id&amp;nbsp; &amp;nbsp; site&amp;nbsp; &amp;nbsp; &amp;nbsp; time_dichotomous_number(ref="1");&lt;BR /&gt;MODEL Score =time_dichotomous_number &amp;nbsp; &amp;nbsp; site&amp;nbsp; &amp;nbsp;time_dichotomous_number*site/ SOLUTION OUTPRED=PREDDATA;&lt;BR /&gt;RANDOM INTERCEPT / SUBJECT = record_id;&lt;BR /&gt;repeatedtime_dichotomous_number / type=ar(1) sub=id;&lt;BR /&gt;store out=MixedModel;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;proc plm restore=MixedModel;&lt;BR /&gt;effectplot interaction (x=site&amp;nbsp; &amp;nbsp;sliceby=time_dichotomous_number) / clm connect;&lt;BR /&gt;effectplot interaction (x=time_dichotomous_number sliceby=site) / clm connect;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2024-02-22 at 11.23.14.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/94007iB5014ECE50FEAF56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2024-02-22 at 11.23.14.png" alt="Screen Shot 2024-02-22 at 11.23.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regardless of how I label the categorical time variable, whether it's named 1-7, using letters (a, b, c, d...), or with a space before the letter, the figure consistently put time 1 at the end (Time 1 is the reference group when running the mixed model). Does anyone know how to position time 1 before time 2? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, on the y-axis, it is labeled as "linear predictor." Is this the mean predicted value generated from the mixed model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 16:32:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917394#M45525</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-22T16:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc plm for mixed model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917411#M45531</link>
      <description>&lt;P&gt;One way to get what you wanted is to run PROC MIXED twice. Once with the&amp;nbsp;&lt;SPAN&gt;(ref="1") option in the CLASS statement so you get what you want for the parameter estimates, and no STORE statement is needed. Then you can run PROC MIXED the second time, with no&amp;nbsp;(ref="1") option in the CLASS statement. Use the STORE statement this time. Then your PROC PLM output should display the time in the order as you wanted. To speed up the second PROC MIXED, you might add NOTEST option in the MODEL statement, also add NOINFO NOITPRINT NOCLPRINT options in the PROC MIXED statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Alternatively, you might define a format for your variable&amp;nbsp;&amp;nbsp;time_dichotomous_number, such that the format for "1" comes first alphabetically, and assign this format to the variable&amp;nbsp;&amp;nbsp;time_dichotomous_number.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, the values being plotted are the predicated values from your PROC MIXED model.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jill&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 17:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917411#M45531</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-02-22T17:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: proc plm for mixed model</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917422#M45535</link>
      <description>Thank you!! The first method works, it's amazing!&lt;BR /&gt;Regarding the second method, could you provide more clarification? I tried to label the time categories as "1", "a", "b", "c", but "1" still appears after "c".</description>
      <pubDate>Thu, 22 Feb 2024 18:36:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-plm-for-mixed-model/m-p/917422#M45535</guid>
      <dc:creator>GiaLee</dc:creator>
      <dc:date>2024-02-22T18:36:34Z</dc:date>
    </item>
  </channel>
</rss>

