Skip to content
Prev 7104 / 20628 Next

MIXED MODEL WITH REPEATED MEASURES

Erin Ryan <erin at ...> writes:
[snip]
I think you're right that DepVar is fixed per individual.
Technical details aside, I'm having trouble seeing how you're
going to estimate the effects of predictor variables that vary
within subject when you've only got one response per subject.
Furthermore, I think what you're terming "RandomVar1" and "RandomVar2"
are probably *not* random variables, but rather are variables
that vary within subject.   For this response variable, I would
suggest averaging the values of RandomVar1 and RandomVar2 per
subject and collapsing the data set to a simple linear model
on subjects -- and get rid of the correlation model at the
same time.  For response variables that do vary within subject,
I would suggest

ModelFit <- lme(fixed = DepVar ~FixedVar1+FixedVar2+
   RandomVar1 + RandomVar2, random = 1 | Subject, 
  na.action = na.omit, data = dataset, corr = corAR())