<?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 MIXED: &amp;quot;Consider using a classification effect in the REPEATED statement&amp;quot; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/272835#M58394</link>
    <description>&lt;DIV id="sasLogWarning1_1464114422824" class="sasWarning focus-line"&gt;I'm attempting a linear mixed-effects regression using PROC MIXED. I have never done this analysis before, and frankly, it's over my head..&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;Can someone help me understand this warning in the log. It only appears in my fully-adjusted model.&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;"The R matrix depends on observation order within subjects. Omitting observations from the analysis because of missing&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;values can affect this matrix. Consider using a classification effect in the REPEATED statement to determine ordering in&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;the R matrix."&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;The &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect019.htm" target="_self"&gt;documentation for the REPEATED statement&lt;/A&gt; states that&amp;nbsp;"&lt;SPAN&gt;Specifying a repeated effect is useful...", but it's not clear what or how I would do so.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&lt;SPAN&gt;Thanks for the assistance.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;
&lt;PRE&gt;	PROC MIXED DATA=have METHOD=REML EMPIRICAL;		
	CLASS condition sex school baseline;
	MODEL score = condition timepoint_num condition*timepoint_num age sex school baseline / SOLUTION;
	REPEATED / TYPE=UN SUBJECT=patientid;
	QUIT;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Tue, 24 May 2016 18:47:27 GMT</pubDate>
    <dc:creator>_maldini_</dc:creator>
    <dc:date>2016-05-24T18:47:27Z</dc:date>
    <item>
      <title>PROC MIXED: "Consider using a classification effect in the REPEATED statement"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/272835#M58394</link>
      <description>&lt;DIV id="sasLogWarning1_1464114422824" class="sasWarning focus-line"&gt;I'm attempting a linear mixed-effects regression using PROC MIXED. I have never done this analysis before, and frankly, it's over my head..&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;Can someone help me understand this warning in the log. It only appears in my fully-adjusted model.&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning focus-line"&gt;"The R matrix depends on observation order within subjects. Omitting observations from the analysis because of missing&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;values can affect this matrix. Consider using a classification effect in the REPEATED statement to determine ordering in&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;the R matrix."&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;The &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect019.htm" target="_self"&gt;documentation for the REPEATED statement&lt;/A&gt; states that&amp;nbsp;"&lt;SPAN&gt;Specifying a repeated effect is useful...", but it's not clear what or how I would do so.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&lt;SPAN&gt;Thanks for the assistance.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;
&lt;PRE&gt;	PROC MIXED DATA=have METHOD=REML EMPIRICAL;		
	CLASS condition sex school baseline;
	MODEL score = condition timepoint_num condition*timepoint_num age sex school baseline / SOLUTION;
	REPEATED / TYPE=UN SUBJECT=patientid;
	QUIT;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV class="sasWarning"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 24 May 2016 18:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/272835#M58394</guid>
      <dc:creator>_maldini_</dc:creator>
      <dc:date>2016-05-24T18:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED: "Consider using a classification effect in the REPEATED statement"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/273027#M58420</link>
      <description>&lt;P&gt;To address the "over my head" concern, you might want to read the papers&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Dickey (2008), &lt;A href="http://www2.sas.com/proceedings/forum2008/374-2008.pdf" target="_self"&gt;"PROC MIXED: Underlying Ideas with Examples"&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Kiernan, Tao, and Gibbs (2012), &lt;A href="http://support.sas.com/resources/papers/proceedings12/332-2012.pdf" target="_self"&gt;"Tips and Strategies for Mixed Modeling with SAS/STAT procedures"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I'm nit an expert in mixed models, but in KTG (2012), on p. 3, there is an example similar to yours. The surrounding text seems to imply that since you did not put PATIENTID on the CLASS statement, that you should sort the data by PATIENTID and by the time-like variable (which might be timepoint_num???). So try this before the PROC MIXED step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by patientid timepoint_num; /* or whatever variable is used to order the repeated obs */&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 14:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/273027#M58420</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-05-25T14:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: PROC MIXED: "Consider using a classification effect in the REPEATED statement"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/273332#M58438</link>
      <description>&lt;P&gt;Working from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;'s surmission about your code, try the following:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA=have METHOD=REML EMPIRICAL;		
	CLASS condition sex school baseline timepoint_num patientid;
	MODEL score = condition timepoint_num condition*timepoint_num age sex school baseline / SOLUTION;
	REPEATED timepoint_num / TYPE=UN SUBJECT=patientid;
	RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will give you a medium inference space solution--broad for patients, narrow for schools. &amp;nbsp;You might want to consider school as a random effect, in which case the following would be appropriate:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA=have METHOD=REML EMPIRICAL;		
	CLASS condition sex school baseline timepoint_num patientid;
	MODEL score = condition timepoint_num condition*timepoint_num age sex  baseline / SOLUTION;
	REPEATED timepoint_num / TYPE=UN SUBJECT=patientid;
        RANDOM intercept/subject=school;
	RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For these to work, you need unique patientid's across all schools, and you need unique observations at each timepoint_num for each patientid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now comes the flood--how does your data breakdown? &amp;nbsp;How many timepoint_num's are you trying to fit? &amp;nbsp;Since they are indexed (presumably, based on the variable name), is the spacing relatively equal between them, and is it similar in number of timepoints across schools?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Besides the texts&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS﻿&lt;/a&gt;&amp;nbsp;mentioned, get a copy of SAS for MIxed Models, 2nd ed. by Littell et al. (3rd ed. soon to be issued).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve Denham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 17:37:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-MIXED-quot-Consider-using-a-classification-effect-in-the/m-p/273332#M58438</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2016-05-26T17:37:41Z</dc:date>
    </item>
  </channel>
</rss>

