[R-sig-ME] can mixed effects models handle two dependent variables
Jarrod Hadfield
j.hadfield at ed.ac.uk
Tue Nov 24 11:21:05 CET 2009
Hi Sarah,
If you're prepared to MCMC it you can use MCMCglmm. Something like:
fit1.cn<-MCMCglmm(cbind(X13c,X15n)~trait+trait:soil+trait:manure-1,
random=us(trait):site, rcov=~us(trait):units, data=data,
family=c("gaussian", "gaussian")
where trait indexes columns of the response (X13c & X13n) and units
indexes rows.
trait+trait:soil+trait:manure-1 fits trait specific intercepts and separate
effects of soil and manure.
us(trait):site fits different site variances for X13c & X13n, together
with the covariance.
us(trait):units fits different residual variances for X13c & X13n,
together with the covariance.
You can not fit the heteroscedastic model exactly, but you could fit
something like
us(trait:soil):units or idh(trait:soil):units in the random effects in
addition to the residual component - a bit like a nugget effect I guess.
Cheers,
Jarrod
Quoting Jude Phillips <birdlists at gmail.com>:
> Hi,
>
> I am carrying out a stable isotope study, where I have measured stable
> isotopes of nitrogen and carbon in plants at different sites. I have been
> able to create mixed models for each isotope separately - eg
>
> fit1.c<-lme(X13c~soil+manure, random=~1|site, weights=varIdent(form = ~ 1 |
> soil), data)
> fit1.n<-lme(X15n~soil+manure, random=~1|site, weights=varIdent(form = ~ 1 |
> soil), data)
>
> What I'm wondering is if I can test both stable isotopes at the same time,
> in a MANOVA style analysis. I can't seem to find any info on this - if
> someone could point me in the direction of some info, or tell me if this
> isn't possible , I'd much appreciate it.
>
> Thanks, Sarah Adams
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list