[R-sig-ME] MCMCglmm: ixn between binary family-level factor and us() random effect
Paul.Johnson at glasgow.ac.uk
Mon Feb 7 01:51:08 CET 2011
Thanks again, for the syntax and for the modelling advice.
I think (hope) I can answer some of your concerns about my model, particularly about the residual and family-level variances being confounded. In the most general model I'm specifying 8 separate variances, for mothers, fathers, daughters and sons at the within-family (R) and between-family (G) levels:
There's only one mother per family so individual level = family level and two variances can't be estimated. The same applies to fathers. For both mothers and fathers the variance at one level has to be fixed at (close to) zero:
# the variances on the diagonal are for daughters, sons, mothers, fathers
I didn't think it mattered which of the R or G variances was fixed (unless the R and G priors differ?). I chose to fix the R variance because I don't know how to fix the variances in the G structure without also fixing the covariances that fall within the partition (in MLWIN it makes no difference which is fixed). I calculate the overall 4x4 covariance matrix by adding the daughter and son residual variances to their family variances and converting to a correlation matrix (for each row of the MCMC output).
I'm not totally confident about this method but I've used it for a previous analysis in MLWIN - this gave sensible estimates for family correlations which I replicated by regressing offspring z-scores on parent z-scores. I haven't yet had time yet to check the MCMCglmm results from the current analysis in a similar way - you might save me the trouble by telling me it's invalid.
PS Here's the call to MCMCglmm:
 "Daughter" "Son" "Mother" "Father"
From: Jarrod Hadfield [j.hadfield at ed.ac.uk]
Sent: 05 February 2011 10:49
To: Paul Johnson
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] MCMCglmm: ixn between binary family-level factor and us() random effect
Does what you want, but I would think hard about what the terms in
us(offpar.f):famid mean. For example the diagonals of the 3x3
covariance matrix are the mother, father and offspring variances, but
only the last variance can be uniquely estimated with all residual
structures (because there are multiple offspring but only a single
mother and a singe father within a family). For example, these
varances would could not be uniquely estimated if gender specific
residual variances were fitted, and would be partially confounded in
your case where you estimate a common variance across offspring and
The off-diagonals (assortative mating, mother-offspring,
father-offspring covariances) can be uniquely estimated but it would
make much more sense to do this at the residual or phenotypic level.
You could probably do it using SIR models but I have not documented or
tested them yet. You could try some of the SEM models used by people
studying human genetics. I believe Mx is widely used, and if you can
get hold of an accompanying book "Methodology for Genetic Studies of
Twins and Families" (1996) by Neale, it is excellent.
Quoting Paul Johnson <Paul.Johnson at glasgow.ac.uk>:
> I'm fitting models to estimate mother-father and parent-offspring
> covariances, using
> random = ~us(offpar.f):famid
> where offpar.f is a factor with 3 levels: offspring, mother, father
> and "famid" is the family ID. This allows me to compare the
> strengths of mother-offspring and father-offspring correlations
> within familes. The next step is to compare these covariances
> between asthma families (AF) and non-asthma families (NAF). I.e. I
> want to estimate three covariances within each level of the NAF/AF
> factor while setting the covariances between NAF and AF families to
> zero. The structure of the 6x6 covariance matrix should be
> VAF 0
> 0 VNAF
> where VAF and VNAF are 3x3 US covariance matrices and the 0s are 3x3
> blocks of zeros.
> How can I specify this in a formula? I've tried various random
> formulae based on what I found in the MCMCglmm course notes and this
> list but with no success.
> Thanks for any help,
> The University of Glasgow, charity number SC004401
> R-sig-mixed-models at r-project.org mailing list
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
The University of Glasgow, charity number SC004401
More information about the R-sig-mixed-models