Forms expected (co)variances for GLMMs fitted with MCMCglmm
buildV.RdForms the expected covariance structure of link-scale observations for GLMMs fitted with MCMCglmm
Arguments
- object
an object of class
"MCMCglmm"- marginal
formula defining random effects to be maginalised
- diag
logical; if
TRUEthe covariances betwween observations are not calculated- it
integer; optional, MCMC iteration on which covariance structure should be based
- posterior
character; if
itisNULLshould the covariance structure be based on the marginal posterior means ('mean') of the VCV parameters, or the posterior modes ('mode'), or a random draw from the posterior with replacement ('distribution'). Ifposterior=="all"the posterior distribution of observation variances is returned- ...
Further arguments to be passed
Value
If diag=TRUE an n by n covariance matrix. If diag=FALSE and posterior!="all" an 1 by n matrix of variances. If posterior=="all" an nit by n matrix of variances (where nit is the number of saved MCMC iterations).
Author
Jarrod Hadfield j.hadfield@ed.ac.uk