[R-sig-ME] Multivariate mixed models

Ingleby, Fiona fci201 at exeter.ac.uk
Sat Sep 22 16:10:13 CEST 2012

Hi everyone,

I have a dataset with 3 trait measurements for individuals from different families, like this:

trait1      trait2      trait3      family
 0.5        -0.2         0.2         A
 0.2         0.7        -0.1         A
 0.3        -0.3         0.5         A
 0.1        -0.1         0.4         B
-0.4         0.5        -0.6         B
-0.1         0.8         0            B
-0.2         0.7         0.5         C

...and so on (there are 80 families with 20 individuals measured from each).

The model I want to fit is pretty straightforward, with the three traits as a multivariate response, and family as a random effect. I want to be able to extract the genetic variance-covariance matrix for the set of 3 traits. I can do this quite easily with MCMCglmm, and am aware of non-Bayesian methods in other programs (i.e. SAS), but awkwardly, I want to fit a non-Bayesian model in R.

I can run individual lmer models for each trait, e.g.:

model <- lmer (trait1 ~ 1 + (1|family) )

and extract the random effects variance for the family term, giving me the genetic variance for each trait from each model individually. But this doesn't allow me to model the genetic covariance between traits, and so I'm wondering if there is a way to run lmer with a multivariate response, or if there is another method I could use to fit this kind of model?

I did try re-arranging my dataset so that the 3 trait scores for each individual were stacked into one variable (creating new variables for trait.id (1, 2, or 3) and individual id within family) like this:

trait.score     trait.id     individual     family

and then the model:

model <- lmer (trait.score ~ 1 + (trait.id|family) + (individual|family) )

but this model makes R crash and so I'm assuming there might be some kind of convergence problem?! And I'm not even sure this model would give me the genetic covariances between traits, it would probably just give the genetic variances for each trait (as before but in one model instead of 3 separately)?
Any ideas/advice would be greatly appreciated.


Fiona Ingleby

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