This function uses Gelman and Rubin's R (potential scale reduction factor) to
check convergence. All checked quantities should have R<1.1.
bamp runs at least four MCMC chains by default (more if
parallel is more than four).
Arguments
- x
An apc object
- info
logical; print more information (including the raw per-effect diagnostic, which is affected by the age-period-cohort identifiability and should not be used on its own, see Details)
- level
level of check; 1 uses point estimate, 2 uses upper C.I.
- auto
logical; should be TRUE if called automatically from
bamp
Details
In an age-period-cohort model the age, period and cohort effects are linearly dependent (Clayton and Schifflers, 1987): a linear trend can be moved between the three effects without changing the likelihood. The individual effect chains can therefore drift along this non-identified direction even when the model has fully converged, which makes a naive Gelman-R on the raw effects report spurious non-convergence.
checkConvergence therefore assesses the quantities that are actually
identified: the smoothing precisions, the intercept, and the fitted linear
predictor (log-odds) in every cell of the Lexis diagram, which is invariant
to the trend re-allocation. With info=TRUE the raw per-effect
diagnostic is also printed for reference.
