<?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: Analyzing a two way anova with proc mixed in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753487#M36656</link>
    <description>&lt;P&gt;Yes.&amp;nbsp; There are some minor differences in syntax between MIXED and GLIMMIX, but you can certainly fit a random intercept model with GLIMMIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
    <pubDate>Mon, 12 Jul 2021 12:37:53 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2021-07-12T12:37:53Z</dc:date>
    <item>
      <title>Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752009#M36579</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are testing the effect of two main factors (factor Diet: A or B) (factor: Drug C or D) and their interaction and have some missing data. There are 4 different groups: AC, AD, BC, BD. In order to be able to select the best covariance structure we are including the repeated statement with the option TYPE= un (or cs, ar(1)) to look at the lowest AIC. But we don't know if we should include a SUB = ID since we are not using repeated measures on the same subjects. Our code is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed DATA=df;&lt;BR /&gt;class ID Diet Drug ;&lt;BR /&gt;model outcome = Diet|Drug;&lt;BR /&gt;repeated /type=ar(1) sub=ID;&lt;BR /&gt;lsmeans Diet|Drug/adjust=tukey;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the "sub" option necessary?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 01:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752009#M36579</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2021-07-05T01:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752274#M36587</link>
      <description>&lt;P&gt;This is a situation where identification of the experimental/observational unit is critical.&amp;nbsp; In other words, what gets repeated, and at what level?&amp;nbsp; If the unit receives all treatments at some point, then there is a time element, which may be completely confounded with the other fixed effects.&amp;nbsp; In that case, a subject=ID statement enables you to separate variability within subject from that which is between subjects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If a unit only receives one of the treatments, then I don't see the repeated nature.&amp;nbsp; In that case, perhaps a RANDOM effect can be applied, but I don't understand the design well enough to know if that is the case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 12:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752274#M36587</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-07-06T12:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752475#M36600</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, thank you for your answer. The design is a two by two. Each unit receives a different treatment. This outcome is not repeated. Only measured at the end of the experiment.&amp;nbsp; Is it correct just to add the random statement like we did below?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc mixed DATA=df;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;class ID Diet Drug ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;model outcome = Diet|Drug;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;random /type=ar(1) sub=ID;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lsmeans Diet|Drug/adjust=tukey;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 00:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752475#M36600</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2021-07-07T00:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752526#M36602</link>
      <description>&lt;P&gt;I think the random statement should look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;random intercept/subject=id;
&lt;/PRE&gt;
&lt;P&gt;You need some effect to actually be random, and the random intercept model is the first to consider, given your design.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I removed type=ar(1) as that assumes there is some ordering to the subjects.&amp;nbsp; I believe you only need a single variance component, so I dropped the type= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 12:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/752526#M36602</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-07-07T12:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753141#M36617</link>
      <description>&lt;P&gt;Thank you very much for your response and explanation. I was wondering if the random intercept model can also be applied to proc glimmix when the study design is the same?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753141#M36617</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2021-07-09T13:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753487#M36656</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; There are some minor differences in syntax between MIXED and GLIMMIX, but you can certainly fit a random intercept model with GLIMMIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 12:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753487#M36656</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-07-12T12:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Analyzing a two way anova with proc mixed</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753652#M36673</link>
      <description>Thank you so much!</description>
      <pubDate>Tue, 13 Jul 2021 02:37:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Analyzing-a-two-way-anova-with-proc-mixed/m-p/753652#M36673</guid>
      <dc:creator>ANKH1</dc:creator>
      <dc:date>2021-07-13T02:37:15Z</dc:date>
    </item>
  </channel>
</rss>

