Hi,
Have columns mate_1, mate_2 ... mate_n where n is group size. In
each column have the identity of each cage mate (order does not
matter). Make sure each column has the same factor levels even if
they don't appear. For example,
factor(mate_1, levels=all.ids)
where all.ids are all possible cage mates. Then fit:
random=~mm(mate_1+mate_2+...mate_n):animal
where animal is linked to the pedigree through the ginverse argument.
Cheers,
Jarrod
Quoting Alexandre Martin <alexandre.m.martin at gmail.com> on Tue, 31
Mar 2015 10:07:34 -0400:
Hi Jarrod,
Thank you for your help.
My question is now extended to the subject of associative indirect
genetic effects.
For example in this data set :
id cage
a 1
b 2
c 1
d 1
e 2
f 2
g 2
cage is a grouping variable describing the composition of cages.
For instance, individuals a,c,d live in cage 1.
Design matrix Z_cage typically produced by MCMCglmm should be:
c1 c2
a 1 0
b 0 1
c 1 0
d 1 0
e 0 1
f 0 1
g 0 1
where phenotype of individuals {a, b, ..., g} are linked to cages 1 and 2.
Design matrix Z_mates, however, linking the phenotype of individual
i to its cage' mates is:
a b c d e f g
a 0 0 1 1 0 0 0
b 0 0 0 0 1 1 1
c 1 0 0 1 0 0 0
d 1 0 1 0 0 0 0
e 0 1 0 0 0 1 1
f 0 1 0 0 1 0 1
g 0 1 0 0 1 1 0
It is Z_cage that is given by default, whereas it is matrix Z_mates
that should be used to predict associative effects.
Is it possible to force MCMCglmm to work with Z_mates instead of Z_cage?
Thanks again!
Alexandre
Le 2015-03-28 04:01, Jarrod Hadfield a ?crit :
Hi Alexandre,
The design matrices should be identical for both effects (z_{ij}=1 if
the jth individual is the mother of individual i). The difference is in
the correlation structure of the random effects. For environmental
maternal effects they are assumed iid (i.e. an identity matrix) but for
the maternal genetic effects they are assumed to be proportional to the
A matrix. inverseA will return the inverse of A if you pass it the
pedigree. It is this inverse that is required for forming the MME.
Cheers,
Jarrod
Quoting Alexandre Martin <alexandre.m.martin at gmail.com> on Fri, 27 Mar
2015 16:39:40 -0400:
Dear all,
I am working on estimating maternal effects (genetic and environmental)
with MCMCglmm that is new for me.
I am trying to apply to MCMCglmm what is shown in online Muir's course
notes made for SAS. Leanning on Henderson?s Mixed Model Equation, these
notes explain how to solve MME to predict random effects ?by hand?.
Here is my concern:
I do not know how to extract the design matrices for a MCMCglmm model,
e.g. the relatedness matrix or the one for maternal genetic effects. I
want that to understand how the design matrices are constructed by
comparing them to what they are supposed to look like. For instance,
the design matrix for maternal genetic effects should relate offspring
to all the individuals that are in the pedigree, whereas the design
matrix for maternal environmental effects should just relate offspring
to their mothers. Does such a difference exist when MCMCglmm constructs
its design matrices? If not, how to include such different matrices in
models?
Any help will be greatly appreciated. Thank you!
Alexandre
[[alternative HTML version deleted]]