[R-sig-ME] cross-sex genetic correlation

Jarrod Hadfield j.hadfield at ed.ac.uk
Tue Jan 16 17:48:34 CET 2018


Hi,

Your reasoning is correct. Other options are also:

~sex:animal  which restrictis rmf=0 and vm=vf

~animal+sex:animal which restricts rmf>0 and vm=vf

Cheers,

Jarrod


On 16/01/2018 12:22, Simona Kralj Fiser wrote:
>
> Hi!
>
> I have some further questions on the cross-sex genetic correlations.
>
> It seems that many studies fail to obtain sample sizes that is big 
> enough to get the realistic 95% CI. One of the solutions I noticed is 
> comparing the models (ASReml) where rmf is set to 1 or 0. How could 
> that be done when using MCMCglmm models? I was thinking of comparing
>
> 1. model 1, rmf=1
>
> prior1<-list(G=list(G1=list(V=matrix(p.var*0.5),n=1)),R=list(V=matrix(p.var*0.5),n=1))
>
> model1 <- MCMCglmm(trait ~ sex, random = ~animal, pedigree = 
> pedigree,data = data, nitt = 100000, thin = 100, burnin = 15000, prior 
> = prior1,verbose = FALSE)
>
> 2. model 2 allowing sexes to have different variance and covariance
>
> prior2 <- list(R=list(V=diag(2), nu=0.02), G=list(G1=list(V=diag(2), 
> nu=2, alpha.mu <http://alpha.mu/>=c(0,0),alpha.V=diag(2)*1000)))
>
> model1 <- MCMCglmm(trait~sex, random=~us(sex):animal, 
> rcov=~idh(sex):units, prior=prior2, pedigree=Ped, data=Data1, 
> nitt=100000, burnin=10000, thin=10)
>
>
> 3. model 3 allowing sexes to have different variance, but covariance = 
> 0 --> rmf = 0
>
> prior2 <- list(R=list(V=diag(2), nu=0.02), G=list(G1=list(V=diag(2), 
> nu=2, alpha.mu <http://alpha.mu/>=c(0,0),alpha.V=diag(2)*1000)))
>
> model3 <- MCMCglmm(trait~sex, random=~idh(sex):animal, 
> rcov=~idh(sex):units, prior=prior2, pedigree=Ped, data=Data1, 
> nitt=100000, burnin=10000, thin=10)
>
>
> My reasoning may be stupid, I hope that's not forbidden :-)
>
> Is there any other way? Fixing variances with prior?
>
> Thank you. Best wishes
>
> Simona
>
>
> On 26 July 2017 at 14:42, Jarrod Hadfield <j.hadfield at ed.ac.uk 
> <mailto:j.hadfield at ed.ac.uk>> wrote:
>
>     Hi,
>
>     The second way is a *much* better way of doing it but should give
>     the same answer. However, in both cases the residual covariance is
>     not identifiable (no individual is both male and female) and so
>     you should use idh rather than us.
>
>     The "subscript out of bounds" error is to do with your code that
>     post-processes the model output not an issue with MCMCglmm.
>     Probably you have used the wrong names for the (co)variance
>     components.
>
>     Also, you haven't passed the prior to MCMCglmm, nor is the prior a
>     valid one for the problem as it specifies scalar variances rather
>     than 2x2 covariance matrices. You could try
>
>     prior2 <- list(R=list(V=diag(2), nu=0.02),
>     G=list(G1=list(V=diag(2), nu=2, alpha.mu
>     <http://alpha.mu>=c(0,0),alpha.V=diag(2)*1000)))
>
>     Cheers,
>
>     Jarrod
>
>
>
>
>     On 26/07/2017 13:33, Simona Kralj Fiser wrote:
>
>         model <- MCMCglmm(W~sex, random=~us(sex):animal,
>         rcov=~us(sex):units,
>         prior=prior2, pedigree=Ped, data=Data1, nitt=100000,
>         burnin=10000, thin=10)
>
>
>
>     -- 
>     The University of Edinburgh is a charitable body, registered in
>     Scotland, with registration number SC005336.
>
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20180116/2da68f43/attachment.ksh>


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