I have a dataset that comprises of the same variable, measured at two different time-points (Pre-treatment and Post-Treatment). I want to check if there is an effect of Age in the results of the treatment.
My first approach would be to go for lmer, with the following structure:
ml1 <- lmer(Vbl ~ TimePoint*Age + (1+TimePoint|ID), data=db1)
However, it produces the following error:
Error: number of observations (=90) <= number of random
effects (=90) for term (TimePoint | ID); the random-effects
parameters and the residual variance (or scale parameter) are
probably unidentifiable
So, I thought about another hypothesis, which would be to run a linear model for the difference between pre-post timepoints:
ml2 <- lm( (Vrb2-Vrb1) ~ Age)
So, the questions I have are:
1. Is ml2 a suitable replaceable for ml1? It accounts for within individual variability, I would say, and by running it alone (lm((Vrb2-Vrb1)~1), I would get the answer to the question 'Does the treatment causes the variable to change.
2. In case the intercept is not zero when only the intercept is considered but, is zero when Age is considered, I am not sure what that means exactly.
lm(Vrb2 ~ Age + offset(Vrb1))(the offset fixes the regression coefficient to 1). This is important if Age is correlated with Vrb1 which can increase Type I error if you fit a regression coefficient) I think the gain-score model is equivalent toml2that you propose – bdeonovic Sep 15 '21 at 18:22