Monday, July 05, 2010

Convergence diagnostics with MCMCglmm

MCMCglmm does not produce more than one chain. So the way to check convergence is to run the model twice, each with different starting values, then conduct the diagnostic with:
gelman.diag(m1$Sol, m2$Sol)

2 comments:

  1. Anonymous11:58 PM

    This did not work - it came up with

    Error in gelman.diag(m1$Sol, m2$Sol) : You need at least two chains

    ReplyDelete
  2. Anonymous10:04 PM

    I got it

    you have to do

    gelman.diag(list(m1$Sol,m2$Sol))

    ReplyDelete