ppc_plots {bayesGAM}R Documentation

Plotting for MCMC visualization and diagnostics provided by bayesplot package

Description

Plots of Rhat statistics, ratios of effective sample size to total sample size, and autocorrelation of MCMC draws.

Usage

ppc_dens(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_dens(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_dens(object, ...)

ppc_dens_overlay(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_dens_overlay(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_dens_overlay(object, ...)

ppc_hist(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_hist(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_hist(object, ...)

ppc_boxplot(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_boxplot(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_boxplot(object, ...)

ppc_freqpoly(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_freqpoly(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_freqpoly(object, ...)

ppc_ecdf_overlay(object, ...)

## S4 method for signature 'bayesGAMfit'
ppc_ecdf_overlay(object, draws = NULL, ...)

## S4 method for signature 'posteriorPredictObject'
ppc_ecdf_overlay(object, ...)

Arguments

object

an object of class bayesGAMfit

...

optional additional arguments to pass to the bayesplot functions

draws

An integer indicating the number of draws to return. The default and maximum number of draws is the size of the posterior sample.

Value

These functions call various plotting functions from the bayesplot package, which returns a list including ggplot2 objects.

Plot Descriptions from the bayesplot package documentation

References

Gabry, Jonah and Mahr, Tristan (2019). bayesplot: Plotting for Bayesian Models. https://mc-stan.org/bayesplot/

Gabry, J., Simpson, D., Vehtari, A., Betancourt, M., and Gelman, A (2019). Visualization in Bayesian Workflow. Journal of the Royal Statistical Society: Series A. Vol 182. Issue 2. p.389-402.

Gelman, A. and Rubin, D. (1992) Inference from Iterative Simulation Using Multiple Sequences. Statistical Science 7(4) 457-472.

Gelman, A., et. al. (2013) Bayesian Data Analysis. Chapman and Hall/CRC.

Gabry, J. , Simpson, D. , Vehtari, A. , Betancourt, M. and Gelman, A. (2019), Visualization in Bayesian workflow. J. R. Stat. Soc. A, 182: 389-402. doi:10.1111/rssa.12378.

Examples

f <- bayesGAM(weight ~ np(height), data = women, 
              family = gaussian, iter=500, chains = 1)
ppc_dens(f, draws=2)

[Package bayesGAM version 0.0.2 Index]