<?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: 3-factor repeated measures ANOVA in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533670#M26879</link>
    <description>&lt;P&gt;Perfect, thank you for your advise!&lt;BR /&gt;&lt;BR /&gt;Does that mean I can compare CS1 and UN2 or all other combinations as well with a likelihood ratio test because they have the same fixed effects (even though the random part may differ)? It would be considered "nested". The same as when I drop a fixed effect.&lt;/P&gt;&lt;P&gt;Only for non-nested (different fixed effects) I must stay in the same type of covariance and change over to AIC model selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;I marked your answer as a solution since it helped a lot and answered my question.&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;Gradually, there are only so many more.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Feb 2019 11:34:29 GMT</pubDate>
    <dc:creator>lotcarrots</dc:creator>
    <dc:date>2019-02-08T11:34:29Z</dc:date>
    <item>
      <title>3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532525#M26842</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Serum samples were split into 4 parts to treat them with a combination of temperature (2 level) and diluent (2 level). The samples were then measured at three time points. Thus, for each subject I have 2x2x3 = 12 measurements. Example:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;ID Sample Time Temp Dilut&lt;BR /&gt;&lt;SPAN&gt;1 1 1 1 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 2 1 2 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 3 1 1 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 4 1 2 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1 2 1 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 2 2 2 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 3 2 1 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 4 2 2 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 1 3 1 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 2 3 2 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 3 3 1 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 4 3 2 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This leads to an 3-factor mixed ANOVA (3 within-subjects factors). Using proc mixed I specified this code, which works fine for compound symmetry:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA = DATA2 METHOD=REML;
	CLASS Temp Dilut Time ID;
	MODEL y = Temp|Dilut|Time ;
	REPEATED Time / SUBJECT=ID TYPE=CS;
RUN; QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;To see if this is appropriate, I would like to see other types of covariance, e.g. &lt;/SPAN&gt;&lt;/SPAN&gt;a unstructured covariance. However, I get the following error with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC MIXED DATA = DATA2 METHOD=REML;
CLASS Temp Dilut Time ID;
MODEL y = Temp|Dilut|Time;
REPEATED Temp*Dilut*Time / SUBJECT=ID TYPE=UN;
RUN; QUIT;

Unable to make Hessian positive definite.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The list of "Covariance Parameter Values at last iteration" displays values of 2 to 85, never 0. &lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;In total, there are 144 observations from 12 subjects.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Is that just too few or is there still an error in the code?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 10:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532525#M26842</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-04T10:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532569#M26844</link>
      <description>&lt;P&gt;For my understanding, the 4 splits of each sample are sub-samples, and you have averaged your data on &lt;EM&gt;Sample &lt;/EM&gt;variable to get &lt;EM&gt;DATA2.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Here the experimental unit of repeated measure &lt;EM&gt;Time&lt;/EM&gt; is &lt;EM&gt;ID*Temp*Dilut&lt;/EM&gt;, so the subject in REPEATED statement should change to as the following. Then you can try other type covarience matrix structure.&lt;/P&gt;&lt;PRE&gt;PROC MIXED DATA = DATA2 METHOD=REML;
	CLASS Temp Dilut Time ID;
	MODEL y = Temp|Dilut|Time ;
	REPEATED Time / SUBJECT=ID*Temp*Dilut TYPE=CS;
RUN; QUIT;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Feb 2019 14:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532569#M26844</guid>
      <dc:creator>xuelin0820</dc:creator>
      <dc:date>2019-02-04T14:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532589#M26846</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;It's true that this code works. But do I really model the covariance correctly with this code? All my observations within a subject are dependent. Not nested within temperature or diluent.&lt;BR /&gt;&lt;BR /&gt;Again for explanation: The 4 splits are used for the 4 different treatment&amp;nbsp;combinations (2x2=4 combinations for temperature and diluent, both two levels).&lt;/SPAN&gt; &lt;SPAN class=""&gt;They were not averaged as they are single observations, each for one of the 4 treatments. The repetitions then come from different subjects (n=12). I have another datset in progress, hence the name if you wondered.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 15:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/532589#M26846</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-04T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533298#M26862</link>
      <description>&lt;P&gt;To clarify: I do not expect that the residuals for &lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;temperature &lt;/SPAN&gt;&lt;/SPAN&gt;1 and 2 are independent of one another neither for &lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;diluent&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think of this work-around with recoding the 4 treatments?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data data2;
   set data2;
   Temp_Dilut = catx(',', Temp, Dilut);
run; 

PROC MIXED DATA = data2;
CLASS ID Temp Dilut Time Temp_Dilut;
MODEL y = Temp|Dilut|Time;
REPEATED Temp_Dilut Time / subject = ID TYPE=un@un r;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;The timepoints are not equally spaced.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Measurements were taken after 24h, 72h and 144h.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Any opinion welcome!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 15:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533298#M26862</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-06T15:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533334#M26864</link>
      <description>&lt;P&gt;If they were not averaged, then the experimental unite of Time is ID*Sample or ID*Temp*Dilut (here Sample and Temp*Dilut are one-to-one relationship).&amp;nbsp;&amp;nbsp;You need include Subject in your code as REPEATED Time / SUBJECT=ID*Sample TYPE=CS; To decide which covariance structure is more appropriate, you can use likelihood test.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 20:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533334#M26864</guid>
      <dc:creator>xuelin0820</dc:creator>
      <dc:date>2019-02-07T20:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533381#M26865</link>
      <description>I do not quite understand: What do you mean by Subject? I don't have a variable called 'Subject'. My experimental unit is ID with repeated measures for Temp and Dilut on time.</description>
      <pubDate>Wed, 06 Feb 2019 20:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533381#M26865</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-06T20:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533398#M26866</link>
      <description>&lt;P&gt;sorry, there is a typo. it should be subject=ID*Sample. Your repeated measure were applied on each sample of a particular ID, so the subject of repeated measure is not ID, but ID*Sample.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 21:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533398#M26866</guid>
      <dc:creator>xuelin0820</dc:creator>
      <dc:date>2019-02-06T21:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533587#M26867</link>
      <description>&lt;P&gt;If you try to correlate all observations from a single ID with TYPE=UN, ie&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;repeated temp*dilut*time / subject=id type=un;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then that will result in a 12x12 covariance matrix with 12*11/2=66 covariance parameters.&amp;nbsp; With 144 total observations, that approach will probably not be successful, resulting in the Hessian matrix message you received.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Kronecker product structures, like TYPE=UN@UN, can be helpful in a situation like this.&amp;nbsp; However, they work best when the repeated measure is done in two dimensions, not three.&amp;nbsp; You can modify the dimensionality here as others have suggested, but that might not give you the results you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use a repeated approach like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;repeated time / subject=id*dilut*temp type=un;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then that correlates the three observations on each of those experimental units with a 3x3 unstructured covariance matrix.&amp;nbsp; As you have noticed,that does not further correlate observations from the same ID.&amp;nbsp; You can handle that by adding a RANDOM statement to the model&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;random int / subject=id;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will add a common covariance to all 12 observations from from the same level of ID.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try that combination of the RANDOM and REPEATED statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 14:17:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533587#M26867</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2019-02-07T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533630#M26870</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;First: Thank you both, xuelin0820 and StatsMan, for helping me solve my problem. I am learning a lot here.&lt;BR /&gt;&lt;BR /&gt;I tried both your solutions, for a start with type=CS or type=UN:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;1) only the repeated (named CS1 and UN1 later)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;REPEATED time / SUBJECT= ID*Sample TYPE=UN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;2) repeated + random (named CS2 and UN2 later)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;REPEATED time / SUBJECT=ID*Temp*Dilut TYPE=UN;
RANDOM int / SUBJECT=ID;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;In general the question: Is it correct that 'method = ML' should be chosen for the comparison of covariance structures (instead of REML)?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Then I get no warning and a table of fit-statistics as&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FitStat.PNG" style="width: 364px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26941i1CBE19404ACA5809/image-size/large?v=v2&amp;amp;px=999" role="button" title="FitStat.PNG" alt="FitStat.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;It seems that both random and repeated supply a better fit, with a significant difference in likelihood in favor for UN2 instead of CS2:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LL_Test.PNG" style="width: 274px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26942i2B45BFA64211DD81/image-size/large?v=v2&amp;amp;px=999" role="button" title="LL_Test.PNG" alt="LL_Test.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;For the same model definitions I would look at AR1 and ARH too.&lt;/SPAN&gt; Then continue working with the model that offers the best fit in terms of likelihood. Do you agree with that workflow?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 15:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533630#M26870</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-07T15:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533648#M26875</link>
      <description>&lt;P&gt;You are on the right track, with the exception that REML should be used when comparing covariance structures using the same fixed effect model.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533648#M26875</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2019-02-07T16:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533670#M26879</link>
      <description>&lt;P&gt;Perfect, thank you for your advise!&lt;BR /&gt;&lt;BR /&gt;Does that mean I can compare CS1 and UN2 or all other combinations as well with a likelihood ratio test because they have the same fixed effects (even though the random part may differ)? It would be considered "nested". The same as when I drop a fixed effect.&lt;/P&gt;&lt;P&gt;Only for non-nested (different fixed effects) I must stay in the same type of covariance and change over to AIC model selection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN&gt;I marked your answer as a solution since it helped a lot and answered my question.&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;Gradually, there are only so many more.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 11:34:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533670#M26879</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-02-08T11:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533909#M26889</link>
      <description>&lt;P&gt;Yes, you can cautiously compare the log-likelihoods under REML when only changing the covariance structure of the model.&amp;nbsp; Just remember to keep the fixed effects the same in each model you are comparing.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 13:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/533909#M26889</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2019-02-08T13:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582711#M28586</link>
      <description>&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I add my question here, because I have another similar experiment and appreciate your help. &lt;/SPAN&gt;&lt;SPAN class=""&gt;Let's say I am also interested in whether the individual animals (ids) differ.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Can I simply put the ID to fixed and delete the random statement? The repeated measurements remain over the two other factors (dilut, temp). So instead of&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLIMMIX DATA = dataset;
	CLASS dilut temp time id;
	MODEL y = dilut|temp|time/ DDFM=BETWITHIN;
	RANDOM time / subject=id*dilut*temp type=un;
	RANDOM int / SUBJECT=id solution;
RUN; QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;I would use&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC GLIMMIX DATA = dataset;
	CLASS dilut temp time id;
	MODEL y = dilut|temp|time id/ DDFM=BETWITHIN;
	RANDOM time / subject=id*dilut*temp type=un;
RUN; QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="tlid-translation translation"&gt;&lt;SPAN class=""&gt;Please do not get confused, by virtue of other settings and available plots I switched to GLIMMIX.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 09:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582711#M28586</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-08-21T09:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582742#M28588</link>
      <description>&lt;P&gt;It really depends on how you want to treat the id levels.&amp;nbsp; If ID is a sample from a population of potential ID's, then you might want to keep ID as a random effect.&amp;nbsp; If the variance component for ID is significantly large (and you can use a COVTEST statement in GLIMMIX if you want a hypothesis test on the significance of the ID variance), then yes there is variability in the id levels.&amp;nbsp; You can still use CONTRAST or ESTIMATE statements if you want to test for differences in the individual levels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the levels of ID you have in your data are the only levels of ID you are interested in, then you can make ID a fixed effect.&amp;nbsp; You can use the LSMEANS statement with the PDIFF option to test for differences in pairs of levels, as well as the CONTRAST, ESTIMATE, and LSMESTIMATE statements.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In practice, you will see some researchers switch ID to a fixed effect even if the ID levels do not have all of your levels of interest.&amp;nbsp; The theory really does not support that approach, however.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 12:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582742#M28588</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2019-08-21T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582778#M28590</link>
      <description>&lt;P&gt;Hi StatsMan, I'm very interested in your answer. I know it is correct, but don't know how to&amp;nbsp;&lt;SPAN&gt;use CONTRAST or ESTIMATE statements&amp;nbsp; to test for differences in the individual levels when ID is a random factor. Can you explain more, or give a short example?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is a general opinion that when considering if we can combine the data from different IDs, or say Years etc, we need to check if&amp;nbsp; Year interacts with other fixed effects. If there is one interaction significant, then it is better to analyze the data by Year. Or when Year effect is significant, even the interact between Year and other factors are nor significant, we also should analyze the data by Year, not combine the data from multiple years. Of course, to test the interaction, Year has to be treated as a fixed effect in SAS, although as you said it is theoretically not appropriate.&amp;nbsp;&amp;nbsp;What do you think?&amp;nbsp;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 13:49:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582778#M28590</guid>
      <dc:creator>RosieSAS</dc:creator>
      <dc:date>2019-08-21T13:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582951#M28596</link>
      <description>&lt;P&gt;Here's a brief example of writing a CONTRAST or ESTIMATE when a random effect is involved:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glimmix data=test;&lt;BR /&gt;class a trt;&lt;BR /&gt;model y=trt x1 x2 x3 / s dist=bin link=logit ;&lt;BR /&gt;random intercept / subject=a s;&lt;BR /&gt;estimate 'diff a2-a3' | int 1 / subject 0 1 -1; &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the vertical bar to indicate that everything following represents the random effects in the model.&amp;nbsp; If you have a SUBJECT= identifier on the RANDOM statement, then use the forward slash and the SUBJECT keyword on the ESTIMATE statement to identify the subject coefficients you want to use.&amp;nbsp; The example here compares levels 2 and 3 of effect A.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 19:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/582951#M28596</guid>
      <dc:creator>StatsMan</dc:creator>
      <dc:date>2019-08-21T19:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: 3-factor repeated measures ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/583084#M28597</link>
      <description>&lt;P&gt;Wow that's indeed interesting! That means with my code having a 3x3 cov matrix and a intercept (see picture), I can test whether my 7 variances are simultaneously equal to 0 or my 7th variance (i.e. the intercept of ID) equals 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;PROC GLIMMIX DATA = ...;&lt;BR /&gt;CLASS SP Ver ZP TierID;&lt;BR /&gt;MODEL y = SP|ZP|Ver / DDFM=BETWITHIN;&lt;BR /&gt;RANDOM ZP / SUBJECT=TierID*SP*Ver TYPE=UN;&lt;BR /&gt;RANDOM int / SUBJECT=TierID solution;&lt;BR /&gt;covtest 0 0 0 0 0 0 0;&lt;BR /&gt;covtest . . . . . . 0;&lt;BR /&gt;estimate 'diff ID2-ID3' | int 1 / subject 0 1 -1;&lt;BR /&gt;RUN; QUIT;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please don't bother with different naming - it's basically the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately with two random statements I get an error for the the estimate statement:&lt;BR /&gt;"Contrasts between subjects require that all random effects have the same subject; the CONTRAST statement is ignored."&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 08:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/3-factor-repeated-measures-ANOVA/m-p/583084#M28597</guid>
      <dc:creator>lotcarrots</dc:creator>
      <dc:date>2019-08-22T08:40:18Z</dc:date>
    </item>
  </channel>
</rss>

