Learn R Programming

bamp (version 2.1.3)

checkConvergence: Check apc object, whether MCMC has converged

Description

This functions uses Gelman and Rubin's R to check convergence for all main parameters. All parameters should have R<1.1. bamp runs at least four MCMC chains by default (more if parallel is more than four).

Usage

checkConvergence(x, info = FALSE, level = 2, auto = FALSE)

Value

logical; TRUE if check is fine.

Arguments

x

An apc object

info

logical; print more information

level

level of check; 1 uses point point estimation, 2 uses upper C.I.

auto

logical; should be TRUE if called automatically from bamp #'

Examples

Run this code
if (FALSE) {
data(apc)
model <- bamp(cases, population, age="rw1", period="rw1", cohort="rw1", periods_per_agegroup = 5)
checkConvergence(model)
}

Run the code above in your browser using DataLab