Skip to content
Prev 14981 / 20628 Next

Question about the predict function in MCMCglmm

Oh dear - it is a bug with the predict function. The default 
posterior="all" which gets the posterior predicted mean is fine, but as 
you say making the prediction on the posterior mean/mode of the 
parameters is not. Having

       object$Sol<-matrix(colMeans(object$Sol), 1, ncol(object$Sol))

below (L66)

       object$VCV<-matrix(colMeans(object$VCV), 1, ncol(object$VCV))

and

       object$Sol<-matrix(posterior.mode(object$Sol, ...), 1, 
ncol(object$Sol))

below (L70)

       object$VCV<-matrix(posterior.mode(object$VCV, ...), 1, 
ncol(object$VCV))

fixes it. I will update MCMCglmm today.

Cheers,

Jarrod
On 02/11/2016 23:19, Joelle Mbatchou wrote:
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20161103/037234d2/attachment.pl>