Plot standard McMC convergence diagnostics to help determine lack of model convergence.
Takes a fitted
fit_ssm object and uses standard McMC convergence diagnostic plots to
aid assessment of lack of convergence.
an output object from
Uses plotting functions from Martyn Plummer's
coda package to help
diagnose lack of convergence for the core model parameters. The traceplot shows the time
series for both McMC chains; the density plot shows the density estimate for each parameter;
the autocorrelation plots show the within-chain sample autocorrelation for each parameter;
the G-B-R shrink factor plot shows the evolution of Gelman and Rubin's shrink factor for
increasing number of iterations. See the
coda package for further details.
Brooks SP, Gelman A (1998) General methods for monitoring convergence of iterative simulations. Journal of Computational and Graphical Statistics 7:434-455
1 2 3 4 5 6 7 8 9 10 11 12
## Not run: data(ellie) fit.s <- fit_ssm(ellie, model = "DCRWS", tstep = 1, adapt = 2000, samples = 1000, thin = 2, span = 0.1) diag_ssm(fit.s) # increase burnin, posterior sample numbers, and thinning factor fit.s2 <- fit_ssm(ellie, model = "DCRWS", tstep = 1, adapt = 5000, samples = 5000, thin = 5, span = 0.1) diag_ssm(fit.s2) ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.