I've been asked to look at a dataset of repeated measures taken during exercise in participants under two conditions control
and treatment
. Measures were recorded at each minute and at maximum exercise tolerance.
Participants reached different max exercise durations and so have different number of samples. Most range from 3-15 minutes. One outlier went 30+ minutes.
Individual data look like this
They are interested in the effect of condition
on the outcome variable ic
.
What would be an appropriate approach here? Is a linear mixed effects model suited to this? GEE? Something else I know even less about?
An LMEM just feels strange to me. Is it estimating the effects of condition
based on assuming that all participants could reach >30 min, and partially pooling an estimate based almost entirely on the outlier id = 16
to fill those "missing" data?
model_full <- lmerTest::lmer(ic ~ (I(time) + I(time^2)) * condition + (time | id), data = df)
> summary(model_full)
...
Random effects:
Groups Name Variance Std.Dev. Corr
id (Intercept) 0.34428 0.5868
I(time) 0.00163 0.0403 -0.40
Residual 0.10893 0.3300
Number of obs: 203, groups: id, 16
Fixed effects:
Estimate Std. Error df t value Pr(>|t|)
(Intercept) 3.65e+00 1.59e-01 1.90e+01 22.94 2.7e-15 ***
I(time) 4.28e-03 1.67e-02 2.66e+01 0.26 0.8000
I(time^2) 3.02e-04 5.81e-04 1.82e+02 0.52 0.6037
conditiontreatment -3.89e-01 8.90e-02 1.69e+02 -4.37 2.2e-05 ***
I(time):conditiontreatment 6.80e-02 2.07e-02 1.74e+02 3.28 0.0013 **
I(time^2):conditiontreatment -2.34e-03 8.91e-04 1.75e+02 -2.63 0.0093 **
We're not trying to predict individual responses per se, just describe within-subject differences related to condition
. Any advice would be appreciated.
func(ic) ~ condition + (1 | participant)
. $\endgroup$anova()
Chisq suggested quadratic was "better". IncludingI(time^2)
in random effects was -0.99 correlated to the linear time term and gave singular fit issues. Paired t-tests were not sig for highest common time (greatest measure shared by both trials). Nor at peak (last measure of each trial). $\endgroup$