Skip to content
Prev 75810 / 398502 Next

lme model: Error in MEEM

Christoph Lehmann <christoph.lehmann <at> gmx.ch> writes:
If you really have 15 observations (690 lines) it should be enough to estimate 
the model (see below). Assume you had some degenerate case. From a 
psychophysical point of view, I am surprised that reaction time is on the right 
side, but that's off-subject.

Dieter

----
sub = data.frame(subject=1:46,group=c(rep("old",32),rep("young",14)))
sub$slope = 2.5+as.numeric(sub$group)+rnorm(46,0.5)

beta = data.frame(
      subject=rep(sub$subject,15),
      group=rep(sub$group,15),
      slope=rep(sub$slope,15),
      RT=rnorm(46*15,100,20))

beta$betadlpcv = beta$slope*beta$RT + rnorm(46*15,0.1)

library(nlme)
beta.lme = lme(betadlpcv ~ RT*group, data=beta, random=~ RT |subject)
summary(beta.lme)