<?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: Multivariate Multilevel model using proc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/927306#M46140</link>
    <description>&lt;P&gt;Like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;mentioned, you can create a new variable indicating which type the response is, turn the data into a long format and fit a model accordingly. Please note that there is only one MODEL statement allowed in PROC MIXED, and only one response variable in the MODEL statement to be specified.&lt;/P&gt;
&lt;P&gt;Here is an example to show you this approach:&lt;/P&gt;
&lt;P&gt;subject&amp;nbsp; height weight gender&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 165&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;56&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;180&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; M&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;data two;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;set one;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;response=height;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;type='Height';&lt;/P&gt;
&lt;P&gt;output;&lt;/P&gt;
&lt;P&gt;response=weight;&lt;/P&gt;
&lt;P&gt;type='Weight';&lt;/P&gt;
&lt;P&gt;output;&lt;/P&gt;
&lt;P&gt;drop height weight;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;Then use Response as your dependent variable in the MODEL statement, and include TYPE as one of your effect in the MODEL statement.&lt;/P&gt;
&lt;P&gt;In your case, the values for TYPE would be your original response variables.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
    <pubDate>Tue, 07 May 2024 13:34:33 GMT</pubDate>
    <dc:creator>jiltao</dc:creator>
    <dc:date>2024-05-07T13:34:33Z</dc:date>
    <item>
      <title>Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925671#M46041</link>
      <description>&lt;P&gt;I am working on a Multivariate multilevel model where&amp;nbsp;&lt;SPAN&gt;The 3 outcome variables RCBPre_Rating RCTPre_Rating RCSPre_Rating are continuous but changes in all three need to be considered simultanously as participants can indicate more or less of each RC type and this combination explains what they believe the complex root causes of an Ableism scenario are (RC1 is bias, RC2 is a lack of training, and RC3 is systemic barriers). The data set is double stacked where items (vignettes) are nested within Participants. There are item-level variables of ableism type (AT, 4 categories) (OB, 4 levels), and 2 item-level covariates of Trial oder. There are participant-level variables of teacher type (TT, 3 categories), and years of experience (YOE), and the participant-level covariates such as other demographic variables ( INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess). I have tried two different ways to get the model to run, one using mutilple model lines in the proc mixed statement, and one using one model line with all three outcome variables, neither way is working! please help me! Syntax for each way is shown below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First way:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=RQ2 method=ml;&lt;BR /&gt;class ResponseID Vignette AT OB Teachertype INLevel INdisschool INLOE PerDis FamDis EthnicitySel Race Gender ADCTO Vtrialorder;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Model statement for RC1 */&lt;BR /&gt;model RCBPre_Rating = OB|AT Teachertype|YOE Teachertype|YOE INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO Vtrialorder / solution ddfm=bw;&lt;BR /&gt;/* Model statement for RC2 */&lt;BR /&gt;model RCTPre_Rating = OB|AT Teachertype|YOE Teachertype|YOE INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO Vtrialorder / solution ddfm=bw;&lt;BR /&gt;/* Model statement for RC3 */&lt;BR /&gt;model RCSPre_Rating = OB|AT Teachertype|YOE Teachertype|YOE INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO Vtrialorder / solution ddfm=bw;&lt;/P&gt;&lt;P&gt;/* Random effects */&lt;BR /&gt;random intercept / subject=ResponseID type=un; /* Random intercept for participants */&lt;BR /&gt;random intercept / subject=vignette type=un; /* Random intercept for vignettes */&lt;/P&gt;&lt;P&gt;/* Random slopes for participant-level effects */&lt;BR /&gt;random ADCTO / subject=vignette;&lt;/P&gt;&lt;P&gt;Vtrialorder / subject=vignette;&lt;BR /&gt;random OB / subject=vignette;&lt;BR /&gt;random AT / subject=vignette;&lt;/P&gt;&lt;P&gt;/* Allow covariance structure to account for multivariate response */&lt;BR /&gt;repeated / subject=ResponseID*vignette type=un group=ResponseID;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second way:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=RQ2 covtest NOCLPRINT Method=REML;&lt;BR /&gt;class ResponseID Vignette AT OB Teachertype INLevel INdisschool INLOE PerDis FamDis EthnicitySel Race Gender ADCTO Vtrialorder;&lt;/P&gt;&lt;P&gt;/* Model statement for RC1 */&lt;BR /&gt;model RCBPre_Rating RCTPre_Rating RCSPre_Rating = OB|AT Teachertype|YOE Teachertype|YOE INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO Vtrialorder / solution DDFM=Satterthwaite;&lt;/P&gt;&lt;P&gt;/* Random effects */&lt;BR /&gt;random intercept / subject=ResponseID type=un; /* Random intercept for participants */&lt;BR /&gt;random intercept / subject=Vignette type=un; /* Random intercept for vignettes */&lt;/P&gt;&lt;P&gt;/* Random slopes for participant-level effects */&lt;BR /&gt;random ADCTO / subject=ResponseID;&lt;BR /&gt;random Vtrialorder / subject=ResponseID;&lt;BR /&gt;random OB / subject=Vignette;&lt;BR /&gt;random AT / subject=Vignette;&lt;/P&gt;&lt;P&gt;/* Allow covariance structure to account for multivariate response */&lt;BR /&gt;repeated / subject=ResponseID*vignette type=un group=ResponseID;&lt;BR /&gt;parms / ols;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 21:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925671#M46041</guid>
      <dc:creator>Colmstead</dc:creator>
      <dc:date>2024-04-24T21:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925672#M46042</link>
      <description>&lt;P&gt;"Not working" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the "&amp;lt;/&amp;gt;" to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the "&amp;lt;/&amp;gt;" icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 21:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925672#M46042</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-04-24T21:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925674#M46043</link>
      <description>&lt;P&gt;For the proc mixed with multiple model statements I get the log warning:&amp;nbsp;&lt;/P&gt;&lt;P&gt;WARNING: Only the last MODEL statement is used.&lt;BR /&gt;WARNING: The R matrix depends on observation order within subjects. Omitting observations from&lt;BR /&gt;the analysis because of missing values can affect this matrix. Consider using a&lt;BR /&gt;classification effect in the REPEATED statement to determine ordering in the R matrix.&lt;BR /&gt;NOTE: 228 observations are not included because of missing values.&lt;BR /&gt;WARNING: Stopped because of infinite likelihood.&lt;BR /&gt;NOTE: PROCEDURE MIXED used (Total process time):&lt;BR /&gt;real time 18.02 seconds&lt;BR /&gt;cpu time 19.21 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the Proc mixed with one model statement with all three outcome variables I get:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=RQ2 covtest NOCLPRINT Method=REML;&lt;BR /&gt;NOTE: PROCEDURE MIXED used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;93 class ResponseID Vignette AT OB Teachertype INLevel INdisschool INLOE PerDis FamDis&lt;BR /&gt;93 ! EthnicitySel Race Gender ADCTO Vtrialorder;&lt;BR /&gt;94&lt;BR /&gt;95 /* Model statement for RC1 */&lt;BR /&gt;96 model RCBPre_Rating RCTPre_Rating RCSPre_Rating = OB|AT Teachertype|YOE Teachertype|YOE&lt;BR /&gt;-------------&lt;BR /&gt;73&lt;BR /&gt;202&lt;BR /&gt;96 ! INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO&lt;BR /&gt;96 ! Vtrialorder / solution DDFM=Satterthwaite;&lt;BR /&gt;ERROR 73-322: Expecting an =.&lt;BR /&gt;ERROR 202-322: The option or parameter is not recognized and will be ignored.&lt;BR /&gt;97&lt;BR /&gt;98 /* Random effects */&lt;BR /&gt;99 random intercept / subject=ResponseID type=un; /* Random intercept for participants */&lt;BR /&gt;100 random intercept / subject=Vignette type=un; /* Random intercept for vignettes */&lt;BR /&gt;101&lt;BR /&gt;102 /* Random slopes for participant-level effects */&lt;BR /&gt;103 random ADCTO / subject=ResponseID;&lt;BR /&gt;104 random Vtrialorder / subject=ResponseID;&lt;BR /&gt;105 random OB / subject=Vignette;&lt;BR /&gt;106 random AT / subject=Vignette;&lt;BR /&gt;107&lt;BR /&gt;108 /* Allow covariance structure to account for multivariate response */&lt;BR /&gt;109 repeated / subject=ResponseID*vignette type=un group=ResponseID;&lt;BR /&gt;110 parms / ols;&lt;BR /&gt;111 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 21:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925674#M46043</guid>
      <dc:creator>Colmstead</dc:creator>
      <dc:date>2024-04-24T21:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925675#M46044</link>
      <description>&lt;P&gt;I have attached My DATA set and syntax files here as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 22:00:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/925675#M46044</guid>
      <dc:creator>Colmstead</dc:creator>
      <dc:date>2024-04-24T22:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/927215#M46126</link>
      <description>&lt;P&gt;I think this may be as simple as defining an additional indicator variable (say type as one of the following&amp;nbsp;&lt;SPAN&gt;RCTPre_Rating,&amp;nbsp;RCBPre_Rating,&amp;nbsp;RCSPre_Rating, and putting the value of each into a single response variable in a long format dataset). You could then fit:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model  response= type OB|AT Teachertype|YOE  INLevel INDisSchool INLOE PerDis FamDis EthnicitySel Race Gender Ableismselfassess ADCTO Vtrialorder / solution ddfm=bw;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;If you have sufficient data, you could even include some interactions of type with the other covariates.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SteveDenham&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:21:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/927215#M46126</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2024-05-06T19:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multivariate Multilevel model using proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/927306#M46140</link>
      <description>&lt;P&gt;Like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;mentioned, you can create a new variable indicating which type the response is, turn the data into a long format and fit a model accordingly. Please note that there is only one MODEL statement allowed in PROC MIXED, and only one response variable in the MODEL statement to be specified.&lt;/P&gt;
&lt;P&gt;Here is an example to show you this approach:&lt;/P&gt;
&lt;P&gt;subject&amp;nbsp; height weight gender&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 165&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;56&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; F&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;180&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;76&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; M&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;data two;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;set one;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;response=height;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;type='Height';&lt;/P&gt;
&lt;P&gt;output;&lt;/P&gt;
&lt;P&gt;response=weight;&lt;/P&gt;
&lt;P&gt;type='Weight';&lt;/P&gt;
&lt;P&gt;output;&lt;/P&gt;
&lt;P&gt;drop height weight;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;Then use Response as your dependent variable in the MODEL statement, and include TYPE as one of your effect in the MODEL statement.&lt;/P&gt;
&lt;P&gt;In your case, the values for TYPE would be your original response variables.&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 13:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Multivariate-Multilevel-model-using-proc-mixed/m-p/927306#M46140</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2024-05-07T13:34:33Z</dc:date>
    </item>
  </channel>
</rss>

