On 18 Jul 2025, at 17:33, Matthew Wolak <mew0099 at auburn.edu> wrote:
[You don't often get email from mew0099 at auburn.edu. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
Dear List,
I am using MCMCglmm for a quantitative genetic analysis of reproductive
success data where 1 focal individual competed in an assay against 3
same-sex competitors. We have pedigree information for every individual
and so I would like to estimate the direct genetic effects (DGE)
variance among focal individuals, indirect genetic effects (IGE)
variance among competitors, and the DGE-IGE covariance.
My main question is whether it is possible to estimate the DGE-IGE
covariance in MCMCglmm? I know this is possible when there is a single
term making up the IGE effects, as in a DGE-maternal genetic covariance
by including these terms in the `str()` function (for example, as
described in another post:
https://stat.ethz.ch/pipermail/r-sig-mixed-models/2017q4/026271.html).
However, since I have 3 competitors I am using the multiple membership
function `mm()` and it seems MCMCglmm does not allow combining `str()`
and `mm()`. The code for specifying my random effects terms _without_ a
covariance is:
```
# below `id` is the focal individual and `irr_comp_X` is each of the 3
competitors of the focal
random = ~ id + mm(irr_comp_1 + irr_comp_2 + irr_comp_3),
ginverse = list(id = AinvM,
irr_comp_1 = AinvM, irr_comp_2 = AinvM, irr_comp_3 = AinvM),
```
If I try to use `str()` to estimate the DGE-IGE covariance as well:
`random = ~str(id + mm(irr_comp_1 + irr_comp_2 + irr_comp_3)) ` I get
the error:
```
Error in buildZ(rmodel.terms[r], data = data, nginverse =
names(ginverse)) :
object id and mm(irr_comp_1 and irr_comp_2 and irr_comp_3) not found
```
Is there another way to write the formula or other workaround for using
MCMCglmm to estimate the DGE-IGE covariance that anyone knows about or
is this currently just not possible?
Sincerely,
Matthew
--
****************************************************
Matthew E. Wolak, Ph.D.
Associate Professor
Department of Biological Sciences
Auburn University
306 Funchess Hall
Auburn, AL 36849, USA
https://qgevoeco.com/
Email:terps at auburn.edu
Tel: 334-844-9242
[[alternative HTML version deleted]]