[R] crossed random effects

Sarah Mclean sarahmclean9 at yahoo.co.nz
Tue Jul 1 07:32:22 CEST 2003


if I have posted this twice, please ignore this. I'm
not sure if I sent it to the correct e-mail address
the first time.

I have a data set on germination and plant growth with
the following variables:

mass (response)
sub (fixed effect)
moist (fixed effect)
pop (fixed effect)
mum (random effect nested within population)
iheight (covariate)
plot (random effect- whole plot factor for split-plot

I want to see if moist or sub interacts with mum for
any of the pops, but I am getting an error message. 

This is the formula I used:
fm$pmu <- getGroups(fm, ~1|pop/mum, level=2)
fm$grp = as.factor(rep(1,nrow(fm)))
fm$pl <- getGroups(fm, ~1|plot)
fm$mo <- getGroups(fm, ~1|moist)
fm$su <- getGroups(fm, ~1|sub)
> fm1 <- lme(sqrt(mass) ~ iheight + moist*sub*pop,
data=fm, random=list(grp=pdBlocked(list(pdIdent(~pl -
1), pdIdent(~pmu - 1),  pdIdent(~pmu:su - 1),
pdIdent(~pmu:mo - 1)))))
Error in chol((value + t(value))/2) : non-positive
definite matrix in chol

I know the problem is with the random interaction
terms, but I don't know how to overcome this.

Any advice would be greatly appreciated. I'm new to R
and analysis such as this.

Thank you,

Sarah Mclean
sarahmclean9 at yahoo.co.nz

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

More information about the R-help mailing list