<?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 SAS Proc Mixed random statement in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Proc-Mixed-random-statement/m-p/70498#M3423</link>
    <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I tried to do a mixed model with AR(1)+RE variance structure. I did it in two ways, as below. Here id is the subject id. There are two covariates: treatment (trt) and month (continuous).&lt;BR /&gt;
&lt;BR /&gt;
proc mixed data=one;&lt;BR /&gt;
class id;&lt;BR /&gt;
model y= trt month /s;&lt;BR /&gt;
repeated / type=ar(1) sub=id;&lt;BR /&gt;
random id;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc mixed data=one;&lt;BR /&gt;
class id;&lt;BR /&gt;
model y= trt month /s;&lt;BR /&gt;
random id / type=ar(1);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, they produced very different results. I checked the book "SAS for Mixed Models" Second Edition. It seems the first one is correct. But I wonder why the second one failed, though it converged with 3 covariance parameters: variance, AR(1) and residual. Does anyone know what is the actual covariance structure for the second model? Thanks a lot!&lt;BR /&gt;
&lt;BR /&gt;
Lei</description>
    <pubDate>Tue, 07 Sep 2010 18:03:39 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-09-07T18:03:39Z</dc:date>
    <item>
      <title>SAS Proc Mixed random statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Proc-Mixed-random-statement/m-p/70498#M3423</link>
      <description>Hi there,&lt;BR /&gt;
&lt;BR /&gt;
I tried to do a mixed model with AR(1)+RE variance structure. I did it in two ways, as below. Here id is the subject id. There are two covariates: treatment (trt) and month (continuous).&lt;BR /&gt;
&lt;BR /&gt;
proc mixed data=one;&lt;BR /&gt;
class id;&lt;BR /&gt;
model y= trt month /s;&lt;BR /&gt;
repeated / type=ar(1) sub=id;&lt;BR /&gt;
random id;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc mixed data=one;&lt;BR /&gt;
class id;&lt;BR /&gt;
model y= trt month /s;&lt;BR /&gt;
random id / type=ar(1);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
However, they produced very different results. I checked the book "SAS for Mixed Models" Second Edition. It seems the first one is correct. But I wonder why the second one failed, though it converged with 3 covariance parameters: variance, AR(1) and residual. Does anyone know what is the actual covariance structure for the second model? Thanks a lot!&lt;BR /&gt;
&lt;BR /&gt;
Lei</description>
      <pubDate>Tue, 07 Sep 2010 18:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Proc-Mixed-random-statement/m-p/70498#M3423</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-09-07T18:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Proc Mixed random statement</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/SAS-Proc-Mixed-random-statement/m-p/70499#M3424</link>
      <description>The second model states (more or less) that, for ordered IDs, the person-specific mean values follow an AR(1) structure.  That is, suppose that you had 5 individuals who had the following ID's and mean values:&lt;BR /&gt;
&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp;&lt;U&gt; &amp;nbsp; &amp;nbsp;ID &amp;nbsp; &amp;nbsp;&lt;/U&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;U&gt; &amp;nbsp; &amp;nbsp;mean &amp;nbsp; &amp;nbsp;&lt;/U&gt;&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;243 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18.21&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;129 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18.96&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;141 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;19.44&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;227 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;26.33&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;313 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22.71&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now, if we order this table by ID, we have&lt;BR /&gt;
&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp;&lt;U&gt; &amp;nbsp; &amp;nbsp;ID &amp;nbsp; &amp;nbsp;&lt;/U&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;U&gt; &amp;nbsp; &amp;nbsp;mean &amp;nbsp; &amp;nbsp;&lt;/U&gt;&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;129 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18.96&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;141 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;19.44&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;227 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;26.33&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;243 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18.21&lt;BR /&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;313 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22.71&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The ordered mean values are 18.96, 19.44, 26.33, 18.21, and 22.71.  There is a variance to these mean values.  That is what the first of the three covariance parameters is estimating.  The AR(1) parameter is estimating a covariance structure in which individuals who have closer ID values would have stronger covariance of the mean values - an assumption that I doubt you want to make.  The last of the three covariance parameters, the residual variance, is estimating the variability of person-specific values about their mean values.</description>
      <pubDate>Wed, 08 Sep 2010 00:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/SAS-Proc-Mixed-random-statement/m-p/70499#M3424</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-09-08T00:41:38Z</dc:date>
    </item>
  </channel>
</rss>

