Learn R Programming

baggr (version 0.2.0)

effect_plot: Plot posterior distribution for treatment effect

Description

This function plots the effect_draw for one or more baggr objects.

Usage

effect_plot(...)

Arguments

...

Object(s) of class baggr. If there is more than one, the names of objects will be used as a plot legend (see example).

Value

A ggplot.

See Also

baggr_compare can be used as a shortcut for effect_plot with argument compare = "effects"

Examples

Run this code
# NOT RUN {
# A single effects plot
bg1 <- baggr(schools, prior_hypersd = uniform(0, 20))
effect_plot(bg1)

# Compare posterior effects as a function of priors (note ppd=F)
bg2 <- baggr(schools, prior_hypersd = normal(0, 5))
effect_plot("Uniform prior on SD"=bg1,
              "Normal prior on SD"=bg2)


# }

Run the code above in your browser using DataLab