6

In this comment @gung mentions that

On a different note, I think it's fair to think of RM ANOVA as a special case of linear mixed models.

and a subsequent comment concurs with this.

I understand that in a repeated-measures ANOVA we have observations nested inside subjects, and the dependency this creates maps precisely onto what linear mixed models are meant to deal with.

In what sense is repeated-measures ANOVA a special case of linear mixed models? Is it that repeated measures ANOVA assumes that the residuals have constant variance and are not correlated with each other, whereas linear mixed models does not assume this?

  • In each case whether the residuals are independent or dependent depends on what you're conditioning on. – Glen_b May 08 '16 at 06:17
  • Repeated measures ANOVA univariate approach is a form of mixed linear model with random factor "subject" http://stats.stackexchange.com/a/13201/3277; http://stats.stackexchange.com/a/19070/3277; http://stats.stackexchange.com/a/59468/3277 (to cite just my answers, while there are much better answers from other people here). – ttnphns May 09 '16 at 09:21
  • Related: [Why do lme and aov return different results for repeated measures ANOVA in R?](http://stats.stackexchange.com/questions/14088) – amoeba May 09 '16 at 10:42

1 Answers1

9

Repeated measurements ANOVA is a special case of linear mixed effects models because it is less-flexible in regards with the structure of the "random-effects" part of a linear mixed effects model as well as it assumes some further conveniences for the data at hand.

The repeated measurements ANOVA starts with the general form: \begin{align} y_{ij} = \mu_{ij} + \pi_{ij}+ \epsilon_{ij} \end{align}

where $i$ indexes the subject, $j$ the time-point, $\mu_{ij}$ is the mean at time $j$ for individual $i$, $\pi_{ij}$ is the consistent departure of $y_{ij}$ fron $\mu_{ij}$ for the the $i$-th individual and $\epsilon_{ij}$ are the errors. By consistent here one means that under (hypothetical) repetitions from the same individual, $y_{ij}$ has mean $\mu_{ij} + \pi_{ij}$. It is what one would describe as the conditional mean response in the context of an LME.

This fine but looking at the "random-effects" part the repeated measures ANOVA assumes that the distribution of the response variables has compound symmetry. This means that all response variables have equal variance, and each pair of response variables have a common correlation. (This strongly relates to the concept of sphericity - theoretically you only need sphericity rather than CS but it is (very) hard to get sphericity without CS. Huynh & Feldt, 1970, JASA). On the other hand, to quote Davis, 2002 Chapt. 6: "The linear mixed models approach to repeated measurements views the analysis as a univariate regression analysis of responses with correlated errors." To that respect the correlation can be many different structures, Toepliz, AR(1), compound symmetry (as above), random intercept and slope, etc. You can mix different error sources "without" a problem (eg. even aov documentation says that "If there are two or more error strata, the methods used are statistically inefficient without balance, and it may be better to use lme in package nlme..."). Finally, coming to the conveniences part: The repeated measurements ANOVA model cannot: 1. have variation among experimental units with respect to the number and timing of observations. 2. handle missing data or 3. time-dependent covariates. These goodies comes with linear mixed models only.

usεr11852
  • 33,608
  • 2
  • 75
  • 117
  • +1 Can you explain the term "consistent" departure within your answer? – Antoni Parellada May 09 '16 at 01:59
  • 2
    Should the model be like $y_{ij} = \mu_j + \pi_i+ \epsilon_{ij}$? Otherwise the three items on the right hand side seem to be not separable?. – bluepole May 09 '16 at 09:32
  • +1. Also +1 to @bluepole's comment, I was also confused by that. Can you also clarify the terminology around this anova model? Is this one-way or "two-way" etc.? I think this is one-way RM ANOVA, more specifically with one within-subject effect (time) and no between-subject effects (these would be e.g. two groups of subjects). This might be helpful to mention. – amoeba May 09 '16 at 09:50
  • 1
    Apart from all that, it would be great if you could elaborate more on what happens (mathematically) when ANOVA is fitting this particular model vs. what happens when mixed model approach is used. In mixed model we assume that $\pi$ terms come from $\mathcal N(\mu,\sigma^2)$ and fit the whole thing with ML. How is anova different? Will the estimates coincide under some conditions? A demonstration would be great too. Sorry for lots of questions, but I am interested in this topic too and would be happy to offer a bounty for a good answer(s). – amoeba May 09 '16 at 09:53
  • 1
    @bluepole: Yes, it is the general basis of the model. Strictly speaking it should be: $y_{ij} = \mu + \pi_i + \tau_j + \epsilon_{ij}$ if anything but I wanted to emphasise the idea of an estimate for each $i$, $j$ index. ($\tau$ being the fixed effect at time $j$) – usεr11852 May 09 '16 at 16:25
  • @AntoniParellada: I amended it a bit; I meant the "random" effects part, I hope the text is clear(er) now. I am just going out of my way not to use LME terminology directly in the RM-ANOVA. :) – usεr11852 May 09 '16 at 16:38
  • @amoeba: What I wrote to bluepole (and what he wrote originally) is the same as a mixed model with one observation per cell and no subject - time interaction (as you correctly noted). I did not aim to describe a particular $n$-way ANOVA in my original model. (Granted it does look like a one-way...) – usεr11852 May 09 '16 at 16:53
  • I find the equation that you wrote in the comments (with $\pi_i$ and $\tau_j$) much clearer than the one you wrote in the post. Not sure why you chose this way of presenting it. Another question. If we write $$y_{ij} = \mu + \pi_i + \tau_j + \epsilon_{ij},$$ and assume that $\pi_i\sim\mathcal N(0,\sigma^2_\pi)$, then this is equivalent to compound symmetry (with non-negative correlations), correct? The cov matrix for different levels of time has all the same elements off-diagonal. What does it mean in this context to use a different correlation structure? – amoeba May 09 '16 at 17:05
  • @amoeba: This correlation structure is more of an LME issue but anyway: By Com.Sym. you have: $\Sigma = \sigma^2 I + \sigma_\gamma 1_l 1^T_l$ as it stands it has 2 components ($l$ is assumed to be a fixed number of measurements from each subject). For example a random effects structure with $q$ effects would be $\Sigma = Z \Gamma Z^T + \sigma^2 I$ and have $1 + 0.5(q*(q-1))$ components. Different structures define different modelling assumptions and have (potentially) many more component to estimate (eg. an AR(1) has just two as $\sigma_{ij} = \sigma^2 \rho^{i-j}$.) – usεr11852 May 09 '16 at 17:27
  • @usεr11852: Yes, this I understand. But it seems to me that the equation/decomposition for $y_{ij}$ that you and I wrote above *automatically entails* compound symmetry structure. So I don't understand how a more general structure can be combined with this equation. Does the equation change? Or do the distributional assumptions on the random effects (such as $\pi_i\sim\mathcal N(0,\sigma^2_\pi)$) change? How? (I don't think this is off-topic here, because OP asked about how is RM-ANOVA related to mixed models, so it's important to understand how more general mixed models work.) – amoeba May 09 '16 at 18:09