<?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 mixed model specification in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45779#M2004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset (see attached), which basically involves 4 treatments for a chemotherapy drug. Samples were taken from 2 biopsy locations, and biopsy were taken at 2 time points. So biopsy location and time are nested within subject, and thus each subject has 4 data points (from 2 biopsy locations and 2 time points). The objective is to study treatment difference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time is 2-level factor (Day 4, Day 10)&lt;/P&gt;&lt;P&gt;biopsysite is 2-level factor (S1 and S2)&lt;/P&gt;&lt;P&gt;trt is 4-level factor (A, B, C, D)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exmple part of the dataet looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pid trt&amp;nbsp; time&amp;nbsp;&amp;nbsp; biopsysite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y age&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1 -0.122&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2 -0.442&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.229&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2 -0.007&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2&amp;nbsp; 0.748&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.086&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2&amp;nbsp; 0.090&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.076&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to fit a mixed model with age, time, trt and time by trt as fixed factor. "time" as repeated measure using AR1(), and "biopsysite" as random with compound symmetry covariance structure between the 2 biopsy locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I specify the mixed model? Is the following correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class pid trt time biopsysite;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model y = age trt time trt*time / s;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random biopsysite / type=cs subject=pid g;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&amp;nbsp; repeated / type=ar(1) subject=pid*biopsysite r;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&amp;nbsp; lsmeans trt*time/cl pdiff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or what about this one, does it make sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=test;&lt;BR /&gt; class time trt pid biopsysite;&lt;BR /&gt; model y=age time trt time*trt/s;&lt;BR /&gt; random biopsysite/type=cs&amp;nbsp; g;&lt;BR /&gt; repeated pid / type=ar(1) r;&lt;/P&gt;&lt;P class="yiv1913064615msonormal"&gt;&lt;SPAN style="color: navy; background-color: white; font-family: 'Arial','sans-serif'; font-size: 10pt;"&gt; lsmeans trt*time / cl pdiff alpha=0.2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2011 22:26:57 GMT</pubDate>
    <dc:creator>Jognnewsas</dc:creator>
    <dc:date>2011-08-09T22:26:57Z</dc:date>
    <item>
      <title>mixed model specification</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45779#M2004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset (see attached), which basically involves 4 treatments for a chemotherapy drug. Samples were taken from 2 biopsy locations, and biopsy were taken at 2 time points. So biopsy location and time are nested within subject, and thus each subject has 4 data points (from 2 biopsy locations and 2 time points). The objective is to study treatment difference. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;time is 2-level factor (Day 4, Day 10)&lt;/P&gt;&lt;P&gt;biopsysite is 2-level factor (S1 and S2)&lt;/P&gt;&lt;P&gt;trt is 4-level factor (A, B, C, D)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An exmple part of the dataet looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pid trt&amp;nbsp; time&amp;nbsp;&amp;nbsp; biopsysite&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y age&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1 -0.122&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2 -0.442&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.229&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P2&amp;nbsp;&amp;nbsp; A DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2 -0.007&amp;nbsp; 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2&amp;nbsp; 0.748&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.086&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S2&amp;nbsp; 0.090&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; P8&amp;nbsp;&amp;nbsp; B DAY 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S1&amp;nbsp; 0.076&amp;nbsp; 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to fit a mixed model with age, time, trt and time by trt as fixed factor. "time" as repeated measure using AR1(), and "biopsysite" as random with compound symmetry covariance structure between the 2 biopsy locations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How should I specify the mixed model? Is the following correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class pid trt time biopsysite;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model y = age trt time trt*time / s;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random biopsysite / type=cs subject=pid g;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&amp;nbsp; repeated / type=ar(1) subject=pid*biopsysite r;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&amp;nbsp; lsmeans trt*time/cl pdiff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or what about this one, does it make sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=test;&lt;BR /&gt; class time trt pid biopsysite;&lt;BR /&gt; model y=age time trt time*trt/s;&lt;BR /&gt; random biopsysite/type=cs&amp;nbsp; g;&lt;BR /&gt; repeated pid / type=ar(1) r;&lt;/P&gt;&lt;P class="yiv1913064615msonormal"&gt;&lt;SPAN style="color: navy; background-color: white; font-family: 'Arial','sans-serif'; font-size: 10pt;"&gt; lsmeans trt*time / cl pdiff alpha=0.2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2011 22:26:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45779#M2004</guid>
      <dc:creator>Jognnewsas</dc:creator>
      <dc:date>2011-08-09T22:26:57Z</dc:date>
    </item>
    <item>
      <title>mixed model specification</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45780#M2005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am thinking&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed data=test;&lt;BR /&gt; class time trt pid biopsysite;&lt;BR /&gt; model y=age time trt time*trt/s;&lt;BR /&gt; random biopsysite /&amp;nbsp; type=cs subject=pid&amp;nbsp; g;&lt;BR /&gt; repeated &lt;STRONG&gt;time&lt;/STRONG&gt; / type=ar(1) subject=pid r;&lt;/P&gt;&lt;P class="yiv1913064615msonormal"&gt;&lt;SPAN style="color: navy; background-color: white; font-family: 'Arial','sans-serif'; font-size: 10pt;"&gt; lsmeans trt*time / cl pdiff alpha=0.2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 14:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45780#M2005</guid>
      <dc:creator>trekvana</dc:creator>
      <dc:date>2011-08-10T14:00:27Z</dc:date>
    </item>
    <item>
      <title>mixed model specification</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45781#M2006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for suggestion. The reason I was using "&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;subject=pid*biopsysite" in repeated statement was because the 2 time points thar were repeated were per each biopsy site, by specifying pid*biopsite intereaction, I was making sure the ar(1) covariance structure is applied to the 2 time point within biopsy site within subject. Accoording to MIXED manual:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;"&lt;/SPAN&gt;use the &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/statug_mixed_sect020.htm#statug.mixed.repeatedstmt_subject"&gt;SUBJECT=&lt;/A&gt; option to define the blocks of &lt;IMG class="math gen" src="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/images/statug_mixed0013.png" style="width: 11px; height: 10px;" /&gt; and the &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/statug_mixed_sect020.htm#statug.mixed.repeatedstmt_type"&gt;TYPE=&lt;/A&gt; option to define their covariance structure"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The block of R in my example is within biopsy site within subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I understanding this correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 16:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45781#M2006</guid>
      <dc:creator>Jognnewsas</dc:creator>
      <dc:date>2011-08-10T16:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: mixed model specification</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45782#M2007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ah in that case do repeated time / type=ar(1) subject=biopsysite(pid)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the subject=biopsysite(pid) specifies that each biopsysite is nested with each pid. you may also want to try random intercept / type=un subject=pid that way you are fitting a random intercept for each person as well as an ar(1) covariance structure for the time points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this ultimately gives you a hybrid covariance structure. i can't think of the complete details off the top of my head (i'll have to reference back to my old school notes if you want more info)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2011 21:31:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45782#M2007</guid>
      <dc:creator>trekvana</dc:creator>
      <dc:date>2011-08-10T21:31:36Z</dc:date>
    </item>
    <item>
      <title>mixed model specification</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45783#M2008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 00:13:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/mixed-model-specification/m-p/45783#M2008</guid>
      <dc:creator>Jognnewsas</dc:creator>
      <dc:date>2011-08-11T00:13:40Z</dc:date>
    </item>
  </channel>
</rss>

