View source: R/plot_stan_hamstr.R
plot_hamstr | R Documentation |
Plots the HAMStR modelled age ~ depth relationship together with
the depths, ages, and age uncertainties in the observed data. A random
sample of size n.iter
of the iterations of the posterior
distribution are plotted as grey lines. The observed data are plotted as
points with +- 2*se error bars.
plot_hamstr(
hamstr_fit,
summarise = TRUE,
n.iter = 1000,
plot_diagnostics = TRUE
)
hamstr_fit |
the object returned from |
summarise |
logical TRUE or FALSE. Plot the realisations as a summarised "ribbon" showing 50% and 95% intervals (faster), or as a spaghetti plot showing individual realisations. Defaults to TRUE (ribbon). |
n.iter |
the number of iterations of the model to plot, defaults to 1000. |
plot_diagnostics |
logical, include diagnostic plots: traceplot of log-posterior, hierarchical accumulations rates, memory parameter. Defaults to TRUE. |
A ggplot2 object
## Not run:
fit <- hamstr(
depth = MSB2K$depth,
obs_age = MSB2K$age,
obs_err = MSB2K$error)
# With age models summarised as a ribbon. Faster than spaghetti plots.
plot_hamstr(fit)
# With age models as spaghetti plots. Can see individual realisations, but slower to plot.
plot_hamstr(fit, summarise = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.