Plot the prior distribution for a simmr run
This function takes the output from simmr_mcmc and plots the prior distribution to enable visual inspection. This can be used by itself or as part of posterior_predictive to visually evaluate the influence of the prior on the posterior distribution.
prior_viz( simmr_out, group = 1, plot = TRUE, include_posterior = TRUE, n_sims = 10000, ggargs = NULL )
simmr_out |
A run of the simmr model from |
group |
Which group to run it for (currently only numeric rather than group names) |
plot |
Whether to create a density plot of the prior or not. The simulated prior values are returned as part of the object |
include_posterior |
Whether to include the posterior distribution on top of the priors. Defaults to TRUE |
n_sims |
The number of simulations from the prior distribution |
ggargs |
Extra arguments to be included in the ggplot (e.g. axis limits) |
## Not run:
data(geese_data_day1)
simmr_1 <- with(
geese_data_day1,
simmr_load(
mixtures = mixtures,
source_names = source_names,
source_means = source_means,
source_sds = source_sds,
correction_means = correction_means,
correction_sds = correction_sds,
concentration_means = concentration_means
)
)
# Plot
plot(simmr_1)
# Print
simmr_1
# MCMC run
simmr_1_out <- simmr_mcmc(simmr_1)
# Prior predictive
prior <- prior_viz(simmr_1_out)
head(prior)
summary(prior)
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.