Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

forest_plot

Draw a forest plot for a baggr model


Description

The forest plot functionality in baggr is a simple interface for calling the forestplot function. By default the forest plot displays raw (unpooled) estimates for groups and the treatment effect estimate underneath. This behaviour can be modified to display pooled group estimates.

Usage

forest_plot(
  bg,
  show = c("inputs", "posterior", "both", "covariates"),
  print = show,
  prob = 0.95,
  digits = 3,
  ...
)

Arguments

bg

a baggr class object

show

if "inputs", then plotted points and lines correspond to raw inputs for each group; if "posterior" – to posterior distribution; you can also plot "both" inputs and posteriors; if "covariates", then fixed effect coefficients are plotted

print

which values to print next to the plot: values of "inputs" or "posterior" means? (if show="covariates", it must be "posterior")

prob

width of the intervals (lines) for the plot

digits

number of digits to display when printing out mean and SD in the plot

...

other arguments passed to forestplot

See Also

forestplot function and its associated vignette for examples; effect_plot and baggr_plot for non-forest plots of baggr results

Examples

bg <- baggr(schools, iter = 500)
forest_plot(bg)
forest_plot(bg, show = "posterior", print = "inputs", digits = 2)

baggr

Bayesian Aggregate Treatment Effects

v0.4.0
GPL (>= 3)
Authors
Witold Wiecek [cre, aut], Rachael Meager [aut], Brice Green [ctb] (predict(), loo_compare, many visuals), Trustees of Columbia University [cph] (tools/make_cc.R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.