plot_marginal_prior {makemyprior}R Documentation

Plotting prior for a single parameter (weight or variance (not standard deviation))

Description

Following the parameterization of the prior.

Usage

plot_marginal_prior(x, obj, param, sd = FALSE)

Arguments

x

Values to evaluate prior in.

obj

An object from make_prior, inference_stan, inference_inla, or makemyprior_gui

param

Name of parameter to plot (see print(obj) for syntax). Note that only variances will be plotted, so V[..] and sigma^2[..] must be used to indicate those parameters.

sd

Whether to plot variance parameters on the standard deviation (TRUE) or variance (FALSE, default) scale

Value

A ggplot with the posterior distribution. See also makemyprior_plotting.

Examples

ex_prior <- makemyprior_example_model()
plot_marginal_prior(seq(0, 1, 0.001), ex_prior, "w[a/a_b]")
plot_marginal_prior(seq(0, 1, 0.001), ex_prior, "w[eps/eps_a_b]")
plot_marginal_prior(seq(0, 5, 0.01), ex_prior, "V[eps_a_b]")


[Package makemyprior version 1.2.1 Index]