[R-sig-ME] MCMCglmm question

Jarrod Hadfield j.hadfield at ed.ac.uk
Tue Jul 17 11:27:34 CEST 2012

Hi Jackson,

You can set up the appropriate constraint by fitting the model as an  
animal model. For MZ twins you have to give them the same identifier  
in the pedigree though.  For example, if the data (my.data) are like  

animal  individual twin  family
A           A       DZ     A
B           B       DZ     A
C           C       MZ     B
C           D       MZ     B
D           E       DZ     C
E           F       DZ     C

and the parents unknown:

ped<-cbind(my.data$animal, paste("mum", my.data$family, sep="."),  
paste("dad", my.data$family, sep="."))


ped<-insertPed(ped)  # this parental records into the pedigree  
(insertPed is in the package MasterBayes)

The analysis is then


m1<-MCMCglmm(y~1, random=animal+family, ginverse=list(animal=Ainv),  

where the animal variance is Va  and the family variance is Vce.

If your data do have no structure (i.e just sets of outbred unrelated  
twins) then the above is quite an inefficient set up. A better option  
is to derive Ainv without the phantom parents:

nDZ<-sum(my.data$twin=="DZ")  # makes sure DZ is level 1 and MZ is level 2

Ainv<-bandSparse(n, n, 0:1,diagonal=list(c(rep(4/3,nDZ), rep(1,  
n-nDZ)), c(rep(c(-2/3,0), nDZ/2),rep(0, n-nDZ))), symmetric=TRUE)


This should be quicker.



Quoting Jackson King <jackson.king722 at gmail.com> on Mon, 16 Jul 2012  
17:54:31 -0500:

> Hello,
> I am trying to fit a simple ACE genetics model with twin data, but am
> having difficulties implementing it in MCMCglmm. The data consist of both
> MZ and DZ twin pairs. The MZ twin variance can be decomposed into ACE;  the
> DZ variance can be partitioned into CE and twin/family specific variance
> and unique genetic variance. I am unable to retrieve these components after
> running a model where unit and twin level variance components are
> estimated. Any thoughts on how to do this? Do I fix the DZ genetic variance
> to be half of the MZ in the prior?
> Many thanks,
> Jackson
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

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