I think one can do all these multiple tests of equivalence within a single linear-mixed models. Given you have multiple (2+) measures after the change took place it is rather natural to present these multiple tests as part of a single repeated-measurements model.
In particular, one could define indicator variables between the successive steps and then check their significance; essentially doing multiple $t$-test in one-go. I think that a random structure with a simple intercept and slope for each subject would be fine. I do not see the absence of independent variables other than time as a structural problem. If anything I think it simplifies matters further.
From what I understand given a starting value(val0
) something takes place (step0
) while stepping from the first measurement period to the second. For the subsequent intra-measurement time periods (step1
, step2
, step3
) nothing happens. Measurement error is assumed constant. So one has something like this:
I create this sample with the following code:
set.seed(123)
sampleTimes <- seq(0,1, length.out = 5);
N = 10^2;
val0 <- rnorm(N, mean = 0, sd = 5); # Starting values
slopeAt0 <- rnorm( N, mean = -10, sd = 5); # Effect kicks in
val1to5 <- val0 + slopeAt0 * diff(sampleTimes[1:2]) # so val0 is +2.5 higher
trueMeans <- cbind( val0, t(matrix(rep(val1to5,4), 4, byrow = TRUE)))
obsSample <- trueMeans + rnorm(N*5)
subject <- (1:N)
matplot(sampleTimes, t(obsSample),type = 'l', ylab= 'Obs. Sample') # Visualise
And define a series of indicator variables for the periods stepping from one measurement point to the next. Notice that I define no "last step" step4
; we do not know what happens after the last measurement point at $t_4$.
Q <- data.frame( t = rep(sampleTimes, times = N),
ID = rep(subject, each = 5), reads = as.vector(t(obsSample)),
step0 = rep(c(1,0,0,0,0), times = N),
step1 = rep(c(0,1,0,0,0), times = N),
step2 = rep(c(0,0,1,0,0), times = N),
step3 = rep(c(0,0,0,1,0), times = N))
Using this design it is a relatively simple task to fit an LME and check if the stepX
variables become statistically significant. The intercept and slope will absorb any subject-specific variations and one bootstrap that model directly. One can also use the $t$-values from the original LME too.
library(lme4)
m1 <- lmer(reads ~ step0 + step1 + step2 + step3 + (t+1|ID), Q)
summary(m1)
confZ = confint(m1, method='boot', nsim= 1000)
print(confZ)
# Computing bootstrap confidence intervals ...
# 2.5 % 97.5 %
# .sig01 3.7653500 5.0961341
# .sig02 -0.2043878 0.9843421
# .sig03 0.3396433 1.2702728
# .sigma 0.9869698 1.1579640
# (Intercept) -3.2169570 -1.2982469
# step0 2.5430254 3.2526163
# step1 -0.2465836 0.4475912
# step2 -0.0728649 0.5659132
# step3 -0.1625806 0.4023341
The results are quite reasonable I think, even for the modest sample size ($N = 10^2$) used. Wanting to be on the safe side I included a random slope and this came as probably redundant (sig02
) (the original problem description does not specify it there is an additional time-varying trend) but excluding it does not alter the basic findings in any way: something happens during the step0
period.