Learn R Programming

bayeslincom (version 1.3.0)

plot.bayeslincom: Plot a linear combination of posterior samples

Description

Plot a linear combination of posterior samples

Usage

# S3 method for bayeslincom
plot(
  x,
  point_col = "black",
  hist_col = "black",
  hist_fill = "gray",
  bar_col = "steelblue",
  bins = 30,
  display_comb_strings = TRUE,
  ...
)

Arguments

x

An object of class bayeslincom

point_col

Color for point indicating mean of posterior

hist_col

Color for histogram edges

hist_fill

Color for histogram bars

bar_col

Color of bar for credible interval

bins

Number of bins

display_comb_strings

If TRUE, displays full strings for combinations in ggplot facets when there is more than one combination in x

...

Currently ignored

Value

An object of class ggplot

Examples

Run this code
# NOT RUN {
if (require(BGGM)) library(BGGM)
Y <- ptsd
colnames(Y) <- letters[1:20]
est <- estimate(Y)
bggm_comb <- lin_comb("a--c + a--d > b--c + b--d",
                      obj = est,
                      ci = 0.90,
                      rope = c(-0.1, 0.1))
plot(bggm_comb)
# }

Run the code above in your browser using DataLab