[R-sig-ME] Specifying an MCMCglmm fit with multiple non-factor predictors?

Ryan King c.ryan.king at gmail.com
Tue Mar 29 21:28:08 CEST 2011


Hi all, I'm trying to fit a model where I have predictors which I
treat as random which are crossed and quantitative.

My Z matrix is n x p, with columns grouped into k sets of predictors
{1...p1, p1+1...p1+p2, ..., p-p_k ... p }, and the G matrix for each
group is a linear combination of two known p_i x p_i matrices {G_i1,
G_i2}  (I think the MCMCglmm course notes call these A_i matrices), so
there are two variance parameters for each group.  There is no special
structure in Z like nesting (although it is very sparse).  In SAS
MIXED I would be using the Lin(2) covariance structure on each of k
random statements.

The MCMCglmm documentation suggests that I can set up direct product G
matrices with the idh variance function, but does not document that
function.  The course notes p64-64 examples set up something
tantalizingly close with idh(sex):dam, but instead of a single factor
variable dam (which internally gets turned into a design matrix) I
already have the design matrix.  I'm not clear how I would specify
something other than identity as the G_i.  I'm willing to
pre-transform my Z_i with {G_i1, G_i2} into {Z_i1, Z_i2} which both
have identity as their G; this is possible in the simple case of my
problem though being able to tackle the more general one would be
nice.

I wrote my own R package to do this estimation for the LMM case since
I couldn't figure out how to do it in lme4, and would like to not
reinvent the wheel again.

Any hints on what the correct input specification for this setup is?
Of course I'll have to get the prior worked out too.

Thanks,
Ryan King
Dept. Health Studies
University of Chicago




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