Skip to content
Prev 6931 / 20628 Next

lme vs lme4

Jim--

lme() random statements can be a list; thus, have you tried something like:

random = list(trtpair = ~1, n.trials = ~nmatr1 + nmatr3)

or, said another way, I'd try that. ;)

[Caveat: I haven't been tracking this thread closely and just noticed 
your question below about specifying the random statement in lme()]

cheers, Dave




Thanks Ben, this helps a lot.  Our issue is #2 as you specify here,
speed is not an issue.

What we are trying to do is accomplish the second analysis, using lme so
we can use the varConstPower function

this works for the fixed effects model,

results <- lme(lor ~0 + nmatr1 + nmatr3 ,random= ~1|trtpair,
data=indat,weights=varConstPower(form=~var,fixed=list(power=1)))

but we can't figure out how to specify the model (as we would using lmer)
to run a random effects models I need to have two random effects,  one
for the treatment pair comparison and another for the effect of
treatment 1 and treatment 3.  Using lmer the code would look like ...

results <- lmer(lor ~0 + nmatr1 + nmatr3+ (1|trtpair) + (nmatr1 +
nmatr3|n.trials),
data=indat,weights=varConstPower(form=~var,fixed=list(power=1)))


Could I please get some clues how to specify this using lme?
Thanks a bunch

J