[R-sig-ME] multivariate mixed nested model

Claudio oppela at gmail.com
Sat Jan 28 16:43:29 CET 2017


Hi all.
I collected six body features (bf1-bf6)from three populations of a
salamander and from two populations of another sister species of
salamander.
I would evaluate how the species (fixed) and population belonging
(random) affect the body features, by comparing models built with lme4.
For some models, I also want to include bf6 as covariate. Thus, in case
of univariate analyses, some models, for example, could be:
mo1<-lmer(bf1~species+(1|species:population), data, REML=FALSE)
mo2<-lmer(bf1~species+bf6+(1|species:population), data, REML=FALSE)

However, I want to fit multivariate models, and my post is about this.
First, I melted the data:
mdata<-melt(data, id.vars = c("species", "population", "bf6"),
measure.vars = c("bf1", "bf2","bf3","bf4","bf5"), variable.name =
"traits)

Now the question.
1) Are the multivariate versions of the models mo1 and mo2 above
mumo1<-lmer(value~traits -1 + species + (1|species:populations) +
(1|individuals), mdata, REML=FALSE)
mumo1<-lmer(value~traits -1 + species + bf6 + (1|species:populations) +
(1|individuals), mdata, REML=FALSE)

A secondary question, which in case I will move to a new post:
it seemed to me that building multivariate models with MCMCglmm is
easier. However, cbind did not work, even without missing values: to
your knowledge, is there any issue?

thanks in advance
Claudio  



More information about the R-sig-mixed-models mailing list