<?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 Nested random effects in proc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37728#M1574</link>
    <description>I want to set up a nested four-level model in proc mixed, say repeated observations within persons within classes within schools. How do I formulate this nesting? Ideally I would do something like:&lt;BR /&gt;
&lt;BR /&gt;
random school;&lt;BR /&gt;
random class(school);&lt;BR /&gt;
"random person(class(school))";&lt;BR /&gt;
&lt;BR /&gt;
but how to specify this last level?</description>
    <pubDate>Thu, 07 Jan 2010 08:32:56 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-01-07T08:32:56Z</dc:date>
    <item>
      <title>Nested random effects in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37728#M1574</link>
      <description>I want to set up a nested four-level model in proc mixed, say repeated observations within persons within classes within schools. How do I formulate this nesting? Ideally I would do something like:&lt;BR /&gt;
&lt;BR /&gt;
random school;&lt;BR /&gt;
random class(school);&lt;BR /&gt;
"random person(class(school))";&lt;BR /&gt;
&lt;BR /&gt;
but how to specify this last level?</description>
      <pubDate>Thu, 07 Jan 2010 08:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37728#M1574</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-07T08:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Nested random effects in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37729#M1575</link>
      <description>I posted a similar thread a few months ago but never got a response. My best guess is &lt;BR /&gt;
&lt;BR /&gt;
random person(class school);</description>
      <pubDate>Thu, 07 Jan 2010 20:55:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37729#M1575</guid>
      <dc:creator>sfleming</dc:creator>
      <dc:date>2010-01-07T20:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nested random effects in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37730#M1576</link>
      <description>Either &lt;BR /&gt;
&lt;BR /&gt;
random person(class school)&lt;BR /&gt;
&lt;BR /&gt;
or &lt;BR /&gt;
&lt;BR /&gt;
random person(class*school)&lt;BR /&gt;
&lt;BR /&gt;
will work.</description>
      <pubDate>Mon, 11 Jan 2010 13:06:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37730#M1576</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-01-11T13:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Nested random effects in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37731#M1577</link>
      <description>The person-specific random effect can be equivalently specified employing a REPEATED statement.  Note that the MIXED documentation states with regard to computational issues that "In general, specify random effects with a lot of levels in the REPEATED statement and those with a few levels in the RANDOM statement."&lt;BR /&gt;
&lt;BR /&gt;
It is well known that a random intercept model results in a within-subject compound symmetric residual covariance structure.  Thus, using the advice to employ a REPEATED statement in place of the RANDOM statement, you would want to construct the REPEATED statement to specify TYPE=CS covariance structure.&lt;BR /&gt;
&lt;BR /&gt;
The MIXED documentation also states "If possible, "'actor out' a common effect from the effects in the RANDOM statement and make it the SUBJECT= effect. This creates a block-diagonal G matrix and can often speed calculations."&lt;BR /&gt;
&lt;BR /&gt;
Following the above cited recommendations, I would employ the following RANDOM/REPEATED statements:&lt;BR /&gt;
&lt;BR /&gt;
random intercept / subject=school;&lt;BR /&gt;
random intercept / subject=class(school);&lt;BR /&gt;
repeated / subject=person(class*school) type=cs;&lt;BR /&gt;
&lt;BR /&gt;
The repeated statement can be specified with or without the asterisk between class and school.</description>
      <pubDate>Mon, 11 Jan 2010 20:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37731#M1577</guid>
      <dc:creator>Dale</dc:creator>
      <dc:date>2010-01-11T20:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Nested random effects in proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37732#M1578</link>
      <description>Thanks, Dale.  That tip should save us a considerable amount of time and effort!</description>
      <pubDate>Tue, 12 Jan 2010 13:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Nested-random-effects-in-proc-mixed/m-p/37732#M1578</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-01-12T13:00:33Z</dc:date>
    </item>
  </channel>
</rss>

