Takes a fitted `fit_ssm`

object and uses standard McMC convergence diagnostic plots to
aid assessment of lack of convergence.

1 | ```
diag_ssm(fit)
``` |

`fit` |
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)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.