假设我对一个定量变量进行了 10 次重复测量两组中的个人(我们称他们为 A 和 B)。对于每个组,我都有变量的估计均值在 10 个时间点,即
和
和相应的这些估计的方差 - 协方差矩阵。
的测试
(为了) 可以很容易地使用 Wald 型测试(对多重测试进行适当的校正)进行:
现在我想测试每组内最大值的时间点在两组之间是否不同。我想原假设可以写成
有什么方法可以测试它?
编辑:一些 R 代码来模拟要玩的数据。
library(MASS)
### number of individuals in the two groups
n1 <- 50
n2 <- 50
### assume a flat trajectory with a single peak at times 4 and 6 in the respective groups
mu1 <- rep(0,10)
mu2 <- rep(0,10)
mu1[4] <- 1
mu2[6] <- 1
### make the raw data autocorrelated with an AR1 structure
V1 <- 5 * toeplitz(ARMAacf(ar=.7, lag.max=9))
V2 <- 5 * toeplitz(ARMAacf(ar=.7, lag.max=9))
### simulate raw data
X1 <- mvrnorm(n1, mu1, V1)
X2 <- mvrnorm(n2, mu2, V2)
### observed means over time in each group
m1 <- apply(X1, 2, mean)
m2 <- apply(X2, 2, mean)
### find time of the maximum mean in each group
tmax1 <- which(m1 == max(m1))
tmax2 <- which(m2 == max(m2))
### plot means over time in each group
plot(1:10, m1, type="o", pch=19, ylim=range(c(m1,m2)), col="red", xlab="Time", ylab="Mean")
lines(1:10, m2, type="o", pch=19, ylim=range(c(m1,m2)), col="blue")
points(tmax1, max(m1), pch=19, cex=2, col="red")
points(tmax2, max(m2), pch=19, cex=2, col="blue")
以及结果图的示例。

