Skip to content

design matrices in MCMCglmm

2 messages · Jarrod Hadfield

#
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,

Sorry it should have been just:

random=~mm(mate_1+mate_2+...mate_n)

and it is the mate_1, mate_2, ... mate_n that need to be linked to the  
A inverse.

Cheers,

Jarrod

Quoting Jarrod Hadfield <j.hadfield at ed.ac.uk> on Fri, 03 Apr 2015  
08:16:02 +0100: