Calculates the Gelman-Rubin criterion for convergence
(uses `gelman.diag`

from package **coda**).

GR_crit(object, confidence = 0.95, transform = FALSE,
autoburnin = TRUE, multivariate = TRUE, subset = NULL,
start = NULL, end = NULL, thin = NULL, warn = TRUE,
mess = TRUE, ...)

## Arguments

object |
object inheriting from class 'JointAI' |

confidence |
the coverage probability of the confidence interval for the
potential scale reduction factor |

transform |
a logical flag indicating whether variables in
`x` should be transformed to improve the normality of the
distribution. If set to TRUE, a log transform or logit transform, as
appropriate, will be applied. |

autoburnin |
a logical flag indicating whether only the second half
of the series should be used in the computation. If set to TRUE
(default) and `start(x)` is less than `end(x)/2` then start
of series will be adjusted so that only second half of series is used. |

multivariate |
a logical flag indicating whether the multivariate
potential scale reduction factor should be calculated for multivariate
chains |

subset |
subset of parameters/variables/nodes (columns in the MCMC sample).
Uses the same logic as the argument `monitor_params` in
`lm_imp` , `glm_imp` , `clm_imp` ,
`lme_imp` , `glme_imp` , `survreg_imp`
and `coxph_imp` . |

start |
the first iteration of interest (see `window.mcmc` ) |

end |
the last iteration of interest (see `window.mcmc` ) |

thin |
thinning interval (see `window.mcmc` ) |

warn |
logical; should warnings be given? Default is
`TRUE` . Note: this applies only to warnings
given directly by **JointAI**. |

mess |
logical; should messages be given? Default is
`TRUE` . Note: this applies only to messages
given directly by **JointAI**. |

... |
currently not used |

## References

Gelman, A and Rubin, DB (1992) Inference from iterative simulation using
multiple sequences, *Statistical Science*, **7**, 457-511.

Brooks, SP. and Gelman, A. (1998) General methods for monitoring convergence
of iterative simulations.
*Journal of Computational and Graphical Statistics*, **7**, 434-455.

## See also

## Examples

#> This is new software. Please report any bugs to the package maintainer.

GR_crit(mod1)

#> Potential scale reduction factors:
#>
#> Point est. Upper C.I.
#> (Intercept) 1.00 1.00
#> C1 1.00 1.00
#> C2 1.03 1.04
#> M22 1.02 1.08
#> M23 1.00 1.01
#> M24 1.01 1.03
#> sigma_y 1.00 1.02
#>
#> Multivariate psrf
#>
#> 1.03