3

In class, we saw how one could use a mixed model as an alternative to the paired t-test. Lets say that we have subjects and each subject is measured twice. So we have a sample before (t = 0) and a sample after (t = 1). A proper way to do this with a mixed model is as follows:

$$Y_{ij} = β_0 + β_1t + a_i + ε_{ij}, a_i ∼ N(0, σ^2_{subject} ), ε_{ij} ∼ N(0, σ^2_{res})$$

where $a_i$ is the random effect for subject. If I would analyse this in, for example SAS, I would use a random intercept model. But why wouldn't it make sense to include a random slope?

$$Y_{ij} = β_0 + (β_1 + a_{2i})t + a_{1i} + ε_{ij}, a_i ∼ N(0, G ), ε_{ij} ∼ N(0, σ^2_{res})$$

where $G$ is the covariance matrix.

MDG1999
  • 95
  • 3
  • 2
    You’re free to do that and might want to. However, then you’re introducing a wrinkle that has no analogue in the t-test. – Dave May 24 '20 at 12:19
  • Thank you for your reply. But then, isn't it always better to use a random slope model instead of using a paired t-test/random intercept model? In reality, every subject will have a different slope, no? If you use the paired t-test, there is no assumption that the variances in the two groups are equal, but using the random intercept model, there is. – MDG1999 May 24 '20 at 13:34
  • 2
    As you include more parameters, the interpretation becomes harder. Remember George Box’s saying that all models are wrong but some are useful. – Dave May 24 '20 at 13:50
  • See also https://stats.stackexchange.com/questions/23276/paired-t-test-as-a-special-case-of-linear-mixed-effect-modeling – kjetil b halvorsen May 24 '20 at 21:54

1 Answers1

4

Indeed a paired $t$-test is equivalent to a linear mixed model that you formulated as

$Y_{ij} = β_0 + β_1t + a_i + ε_{ij}; \\a_i ∼ N(0, σ^2_{subject}), ~ε_{ij} ∼ N(0, σ^2_{res}); \\i=1,2,...,n; j=1,2;$

where $i$ indices the subjects and $j$ codes the two paired conditions.

why wouldn't it make sense to include a random slope?

The dummy variable $t$ for the two paired conditions in your LME model is directly mapped to the index $j$:

$t=0, ~j=1; \\t=1,~j=2.$

In other words, by adding a varying slope as you suggested,

$Y_{ij} = β_0 + (β_1 + a_{2i})t + a_{1i} + ε_{ij}; \\(a_{1i}, a_{2i})' ∼ N(0, G ), ~ε_{ij} ∼ N(0, σ^2_{res}); \\i=1,2,...,n; j=1,2;$

you would end up with a collinear problem:

$a_{1i} + a_{2i}t = ε_{ij}.$

That is, this latter LME model is indeterminate because you cannot differentiate the residuals from the varying intercept and slope.

bluepole
  • 2,376
  • 3
  • 25
  • 34