[R-sig-ME] Fitting linear mixed model to longitudinal data with very few data points
David Westergaard
david at harsk.dk
Sun Nov 24 08:54:57 CET 2013
Hello everyone,
First off, I've posted a similar question to StackExchange
(http://stats.stackexchange.com/questions/76980/analysis-of-longitudinal-data-with-very-few-points),
but I received no answers.
To summarise the data: From 2 subjects, 8 response values were
measured at time points T0, T1, T2, T3. At T1, subject 1 underwent
treatment. Subject 1 received no further treatment after T1.
I've reasoned that this is a repeated measures mixed model kind of
design, so I tried to fit a linear model with random effects, using
lme4:
lm1 <- lmer(Response ~ Treatment * Timepoint + (1|Subject),
data=my_data,REML=FALSE)
However, I am not sure if this model is "correct," I have entered time
points as factorial values, but I am ensure if they should instead be
numerical values. They are quite spread. On a side note, if I don't
set REML=FALSE, I get an error "Computed variance-covariance matrix is
not positive definite" when I try to run "summary(lm1)". I'm guessing
this may have something to do with my sample size.
I am a bit unsure of how to evaluate the model. The number of data
points is extremely low. My naive approach was to make an alternative
model, which does not include treatment:
lm2 <- lmer(Response ~ Timepoint + (1|subject_id), data=test,REML=FALSE)
And do an ANOVA to see which one fits the data better. This is the output:
anova(lm1,lm2)
Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
lm2 6 87.12 87.60 -37.561 75.12
lm1 10 -453.72 -452.93 236.860 -473.72 548.84 4 < 2.2e-16 ***
>From this, can I conclude that lm1 fits the data significantly better,
and is a reliable model?
What I'm trying to investigate, is:
1. Is there any observable effect after administering the drug (i.e.
is the difference between response values significantly greater than
zero)
2. If there is an effect, what is the effect size at each time point
(i.e. what is the difference between response values)
3. How does the effect vary over time
4. If there is an effect, is the effect observed from the drug at T1
still persistant at T3
Any help on this matter is much appreciated.
Regards,
David
More information about the R-sig-mixed-models
mailing list