Learn R Programming

JointAI (version 0.1.0)

GR_crit: Gelman-Rubin criterion for convergence

Description

Gelman-Rubin criterion for convergence (uses gelman.diag)

Usage

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

Arguments

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 monitored parameters (columns in the MCMC sample). Can be specified as a numeric vector of columns, a vector of column names, as subset = "main" or NULL. If NULL, all monitored nodes will be plotted. subset = "main" (default) the main parameters of the analysis model will be plotted (regression coefficients/fixed effects, and, if available, standard deviation of the residual and random effects covariance matrix).

start

the first iteration of interest (see window.mcmc)

end

the last iteration of interest (see window.mcmc)

thin

thinning interval (see window.mcmc)

...

currently not used

References

Gelman, A., Meng, X. L., & Stern, H. (1996). Posterior predictive assessment of model fitness via realized discrepancies. Statistica Sinica, 733-760.

Examples

Run this code
# NOT RUN {
mod1 <- lm_imp(y~C1 + C2 + M2, data = wideDF, n.iter = 100)
GR_crit(mod1)


# }

Run the code above in your browser using DataLab