pp_int_plot: Posterior Predictive Intervals

Description Usage Arguments

View source: R/pp_int_plot.R

Description

Means and credible intervals of ySim with y overlaid. Modification of ppc_intervals in the bayesplot package for use with the abdiststan package.

Usage

1
2
pp_int_plot(y, ySim, x = NULL, ..., cred_inner = 0.05,
  cred_outer = 0.95, size = 1, fatten = 1, point.size = 2.4)

Arguments

y

the vector of observed y values

ySim

a matrix or data frame of the posterior predictive distribution

x

A numeric vector the same length as y to use as the x-axis variable. For example, x could be a predictor variable from a regression model, a time variable for time-series models, etc. If x is missing or NULL, then 1:length(y) is used for the x-axis.

cred_inner

inner credible interval. Defaults to .05 so that it's not visible.

cred_outer

size of posterior interval. Defaults to .95.

point.size

size of points representing y. Defaults to 2.4

alpha, size, fatten

Arguments passed to geoms. For ribbon plots alpha and size are passed to geom_ribbon. For interval plots size and fatten are passed to geom_pointrange.


abnormally-distributed/abdisttools documentation built on May 5, 2019, 7:07 a.m.