[R] using pdMAT in the lme function?
Douglas Bates
bates at stat.wisc.edu
Tue Nov 25 18:16:58 CET 2003
"Bill Shipley" <bill.shipley at usherbrooke.ca> writes:
> Hello. I want to specify a diagonal structure for the covariance matrix
> of random effects in the lme() function.
>
> Here is the call before I specify a diagonal structure:
> > fit2<-lme(Ln.rgr~I(Ln.nar-log(0.0011)),data=meta.analysis,
>
> + random=~1+I(Ln.nar-log(0.0011)|STUDY.CODE,na.action=na.omit)
>
>
>
> and this works fine. Now, I want to fix the covariance between the
> between-groups slopes and intercepts to zero. I try do do this using
> the pdDiag command as follows, but it does not work:
>
>
>
> > fit2<-lme(Ln.rgr~I(Ln.nar-log(0.0011)),data=meta.analysis,
>
> +
> random=pdDiag(diag(2),~1+I(Ln.nar-log(0.0011))|STUDY.CODE),na.action=na.
> omit)
Try random=list(STUDY.CODE=pdDiag(~1+I(Ln.nar-log(0.0011))))
More information about the R-help
mailing list