bhlm.SDplots: Savage-Dickey plots for outcomes

Description Usage Arguments Value Author(s)

Description

Plot outcomes posterior and prior distributions with object from bhlm.

Usage

1
2
3
bhlm.SDplots(bhlm_object, null_hypothesis, outcome_priors_data = NULL,
  outcome_options = NULL, return_plots = FALSE,
  density_estimation = "logspline", cum_prob = NULL, iter = 10000)

Arguments

bhlm_object

Object returned from bhlm, of class bhlm_object.

null_hypothesis

int, point at which to check the Bayes Factor.

outcome_priors_data

data.frame with variables for each outcome (Important: variable names need to be the same as chosen outcome names.). Sample from the prior distribution with ex. rnorm(10000, 0, 1).

If not set, automatically samples from the prior distributions (bhlm_object@outcome_priors_c or bhlm_object@outcome_priors_m). Automatic sampling is not yet implemented for priors defined with data vectors.

outcome_options

Choose which outcomes should be plotted. Defaults to bhlm_object@outcome_options.

return_plots

Return ggplot objects in list.

density_estimation

Log estimate the posterior and prior distributions for the plot.

Non-log estimated plots are not yet fully implemented.

cum_prob

Print cummulated probability (from log estimated posterior distribution) at chosen point along x

(Not yet implemented).

iter

Number of iterations for sampling from prior distribution in automatic sampling.

Value

list of outcomes with each element containing a plot and log estimation of the posterior distribution. T he simulation data is also listed as "data".

Get plot: list$outcome$plot

Get Log estimate: list$outcome$log_est

Author(s)

Hugh Benjamin Zachariae


arcuo/BHLM_package documentation built on May 23, 2019, 8:02 p.m.