<?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: How do I nest 3 random effects in Proc Mixed? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-nest-3-random-effects-in-Proc-Mixed/m-p/364684#M19142</link>
    <description>&lt;P&gt;Assuming that treatment is the only fixed effect:&lt;/P&gt;
&lt;PRE&gt;class treatment pen animal;&lt;BR /&gt;model y = treatment;
random pen(treatment)
&amp;nbsp;      animal*pen(treatment);
&lt;/PRE&gt;
&lt;P&gt;Given how SAS expands syntax, there are equivalent ways to identify a random effect in this model:&lt;/P&gt;
&lt;P&gt;"pen(treatment)" == "pen*treatment"&lt;/P&gt;
&lt;P&gt;"animal*pen(treatment)" == "animal*pen*treatment" == "animal(pen treatment)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Equation-wise, something like (without going to the trouble of proper symbols)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;y_ijkm = mu + t_i + p_ij + a_k(ij) + e_m(ijk)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where i indexes treatment t&lt;/P&gt;
&lt;P&gt;j indexes pen p&lt;/P&gt;
&lt;P&gt;k indexes animal a&lt;/P&gt;
&lt;P&gt;m indexes sample e (residual error)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 19:04:19 GMT</pubDate>
    <dc:creator>sld</dc:creator>
    <dc:date>2017-06-06T19:04:19Z</dc:date>
    <item>
      <title>How do I nest 3 random effects in Proc Mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-nest-3-random-effects-in-Proc-Mixed/m-p/363991#M19130</link>
      <description>&lt;P&gt;I'm looking for some help nesting factors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following experiment design:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Four Treatments&lt;/P&gt;&lt;P&gt;Four pens per treatment&lt;/P&gt;&lt;P&gt;Four sampled animals per pen&lt;/P&gt;&lt;P&gt;3 samples measured per animal, sometimes just two samples measured, at the same time point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously, I have only take one sample per animal, and my mode and random statement with nesting looks something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Model = Treatment / cl;&lt;/P&gt;&lt;P&gt;Random Pen(Treatment);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering how I could work Animal into that statement.&amp;nbsp; Maybe Animal*Pen(Treatment), or Animal (Pen Treatment) ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Furthermore, when I write out a linear model equation, I would represent the Pen(Treatment) as uij&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;u for random effect of j pen for i treatment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I properly state it if I incorporated Animal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uija, with a for animal maybe?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I look forward to any thoughts on this would be appreciated.&amp;nbsp; Apologies if my stats language is a bit imprecise.&amp;nbsp; Too much veterinary medicine and not enough math in my life.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2017 07:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-nest-3-random-effects-in-Proc-Mixed/m-p/363991#M19130</guid>
      <dc:creator>Chris_Poulos</dc:creator>
      <dc:date>2017-06-03T07:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I nest 3 random effects in Proc Mixed?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-nest-3-random-effects-in-Proc-Mixed/m-p/364684#M19142</link>
      <description>&lt;P&gt;Assuming that treatment is the only fixed effect:&lt;/P&gt;
&lt;PRE&gt;class treatment pen animal;&lt;BR /&gt;model y = treatment;
random pen(treatment)
&amp;nbsp;      animal*pen(treatment);
&lt;/PRE&gt;
&lt;P&gt;Given how SAS expands syntax, there are equivalent ways to identify a random effect in this model:&lt;/P&gt;
&lt;P&gt;"pen(treatment)" == "pen*treatment"&lt;/P&gt;
&lt;P&gt;"animal*pen(treatment)" == "animal*pen*treatment" == "animal(pen treatment)"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Equation-wise, something like (without going to the trouble of proper symbols)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;y_ijkm = mu + t_i + p_ij + a_k(ij) + e_m(ijk)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where i indexes treatment t&lt;/P&gt;
&lt;P&gt;j indexes pen p&lt;/P&gt;
&lt;P&gt;k indexes animal a&lt;/P&gt;
&lt;P&gt;m indexes sample e (residual error)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:04:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-do-I-nest-3-random-effects-in-Proc-Mixed/m-p/364684#M19142</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2017-06-06T19:04:19Z</dc:date>
    </item>
  </channel>
</rss>

