[R-sig-ME] Convergence diagnostics for MCMCglmm

Ben Bolker bolker at ufl.edu
Thu Nov 19 14:37:57 CET 2009


  library(MCMCglmm)
  example(MCMCglmm)
  ## what do the results look like?
  class(model1) ## oh, it's a list?
  str(model1)   ##  first element has class
                ## "mcmc" -- that's good ...
  library(coda)
  raftery.diag(model1$Sol)
  xyplot(model1$Sol)

  I'm too lazy to look through the vignette at the moment but at least
this model is not multi-chain, so no Gelman-Rubin ...

  geweke.diag(model1$Sol) ##
  geweke.plot(model1$Sol)

Dawson Wayne wrote:
> Dear R users,
> 
> I've managed to get to grips with using MCMCglmm for phylogenetic  
> meta-analysis, thanks to help on here from Jarrod Hadfield. However, I  
> haven't yet worked out how to use convergence diagnostics on MCMCglmm  
> output.
> 
> I am currently running models for 50,000 iterations, with a long  
> burnin of 25000, and a thinning interval of 10. Whilst my trace plots  
> look good, I would like to use the Gelman-Rubin or Raftery-Lewis  
> diagnostics in the coda package to check that my burnin/no. of  
> iterations are adequate. I've read relevant sections in Ch. 7 of Ben  
> Bolkers ecological models book, and the coda/MCMCglmm package pdfs,  
> but I'm still not sure what mcmc output from MCMCglmm I am supposed to  
> pass to the coda diagnostic functions. Apologies for the simple  
> question, but hopefully there is a simple answer!
> 
> Any suggestions appreciated as always,
> 
> Thanks,
> 
> Wayne
> 


-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc




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