[R-sig-ME] Repeated Measures Design With lme Function
telli at bu.edu
Sat Feb 10 21:59:30 CET 2018
I'm having a hard time defining a model with my repeated measures design
(explained below). This is an experimental design and it is fully balanced.
I would really appreciate it if you have any feedback.
Here's the design of my experiment: I have 72 children (Subject ID) answer
five questions (Question) about five different categories (Category).
Basically, the same five questions repeat for each category. So, in long
format, every participant has 25 rows (five for each level of category and
within each level of category, question has five levels).
Now, I want to fit a mixed-effects regression model on this data, using the
lme function from the nmle package, but I'm not sure how to account for the
fact that Category repeats with Subject ID and Question repeats with
Category. This is what I have so far, but I'm not sure if I'm specifying
the random part of the model correctly:
summary(Qs <- lme(Essen ~ Question * AgeinYears * Category,
random = ~1|SubjectID/Category/Question, data = Q, na.action = na.omit))
I just want to make sure that I am allowing Category to vary within
SubjectID and Question to vary within Category.
Also, is it correct to say that Category is "nested" under Subject ID and
Question is nested under Category?
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models