plot_fit.Rd
function for plotting Bayesian B-spline model for estimating reference series and/or assessing aging bias
plot_fit(
df,
ext,
probs = c(0.05, 0.5, 0.95),
post.den = TRUE,
legend = TRUE,
min.BY,
max.BY
)
data list object from data_prep
and used to estimate the STAN model
posterior draws extraction list from extract_draws
function
vector of three probabilities for lower CI, centrality, upper CI
logical flag to plot posterior densities of certain parameters
logical flag to plot legend
figure only, invisible
#REFERENCE-ONLY
df <- data_prep(sim_ref)
#> No values provided in df_unk, skipping validation and estimating reference series only
#estimate model
fit <- est_model(df, show_messages = FALSE, show_exceptions = FALSE)
#extract draws
draws <- extract_draws(fit)
#plot fit
plot_fit(df, draws)
#INTEGRATED
if (FALSE) {
df_int <- data_prep(sim_ref, sim_unk)
fit_int <- est_model(df_int)
draws_int <- extract_draws(fit_int)
plot_fit(df_int, draws_int)
}