[R-sig-ME] QGglmm multivariate with fixed effects

Pierre de Villemereuil pierre.de.villemereuil at mailoo.org
Thu Mar 1 17:34:33 CET 2018

Hi Walid,

QGparams yields the point estimates corresponding to the point estimates it was given as input. But if you work with MCMCglmm, you might want to use to obtain the whole posterior distribution of the parameters on the observed data scale (see section 5.3 of the vignette "How To"), then take the point estimate you want to use (mode, mean, median, your choice). If your binomial model uses a logit link, it might be a bit slow, as there is no close formula for this model...

Running QGmvparams accounting for fixed effects is similar to the monovariate case, but you need to pass a matrix to "predict" rather than a vector. Quoting the help page of QGmvparams:
predict: Optional matrix of predicted values on the latent scale (each
          trait in each column). The latent predicted values must be
          computed while only accounting for the fixed effects
          (marginal to the random effects). (numeric)

I'd be happy to hear any feedback on how to make the package easier to use and the "How To" easier to understand (maybe outside of the mailing list). I have been thinking about a "wrapper" function to make the process of integrating over the posterior distribution easier but I haven't had the time to implement it.


Le jeudi 1 mars 2018, 17:04:58 CET Walid Mawass a écrit :
> Hello everyone,
> I am working with the QGglmm package by Pierre de Villemereuil to 
> calculate heritability and additive variance on the observable scale 
> since my response variable is binomial and I am using MCMCglmm. I read 
> his 'How to' pdf but it does not precisely say if the output represents 
> the posterior mode or the mean for each parameter. Is it possible to 
> compute the mode of the additive genetic variance and heritability 
> instead of the mean if that is the case.
> In addition, in his tutorial, he explains how to calculate the 
> parameters if there are fixed effects in the model by using predict 
> instead of calculating the mean of the trait. However that is only in 
> the case of a univariate model, I was not successful in applying it for 
> a multivariate model with fixed effects. I would appreciate it if I 
> could get some help on how to proceed in this case.
> Thank you
> -- 
> Walid Mawass
> Ph.D. candidate in Cellular and Molecular Biology
> Population Genetics Laboratory
> University of Québec at Trois-Rivières
> 3351, boul. des Forges, C.P. 500
> Trois-Rivières (Québec) G9A 5H7
> Telephone: 819-376-5011 poste 3384
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

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