bayesplot packagePlots of Rhat statistics, ratios of effective sample size to total sample size, and autocorrelation of MCMC draws.
ppc_dens(object, ...)# S4 method for bayesGAMfit
ppc_dens(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_dens(object, ...)
ppc_dens_overlay(object, ...)
# S4 method for bayesGAMfit
ppc_dens_overlay(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_dens_overlay(object, ...)
ppc_hist(object, ...)
# S4 method for bayesGAMfit
ppc_hist(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_hist(object, ...)
ppc_boxplot(object, ...)
# S4 method for bayesGAMfit
ppc_boxplot(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_boxplot(object, ...)
ppc_freqpoly(object, ...)
# S4 method for bayesGAMfit
ppc_freqpoly(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_freqpoly(object, ...)
ppc_ecdf_overlay(object, ...)
# S4 method for bayesGAMfit
ppc_ecdf_overlay(object, draws = NULL, ...)
# S4 method for posteriorPredictObject
ppc_ecdf_overlay(object, ...)
an object of class bayesGAMfit
optional additional arguments to pass to the bayesplot functions
An integer indicating the number of draws to return. The default and maximum number of draws is the size of the posterior sample.
These functions call various plotting functions from the bayesplot package, which returns a list including ggplot2 objects.
ppc_hist(object, draws=NULL, ...)
A separate histogram estimate is displayed for y and each dataset (row) in yrep. For these plots yrep should therefore contain only a small number of rows.
ppc_boxplot(object, draws=NULL, ...)
A separate box and whiskers plot is displayed for y and each dataset (row) in yrep. For these plots yrep should therefore contain only a small number of rows.
ppc_freqpoly(object, draws=NULL, ...)
A separate shaded frequency polygon is displayed for y and each dataset (row) in yrep. For these plots yrep should therefore contain only a small number of rows.
ppc_dens(object, draws=NULL, ...)
A separate smoothed kernel density estimate is displayed for y and each dataset (row) in yrep. For these plots yrep should therefore contain only a small number of rows.
ppc_dens_overlay(object, draws=NULL, ...)
Kernel density estimates of each dataset (row) in yrep are overlaid, with the distribution of y itself on top (and in a darker shade).
ppc_ecdf_overlay(object, draws=NULL, ...)
Empirical CDF estimates of each dataset (row) in yrep are overlaid, with the distribution of y itself on top (and in a darker shade).
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.
# NOT RUN {
f <- bayesGAM(weight ~ np(height), data = women,
family = gaussian, iter=500, chains = 1)
ppc_dens(f, draws=2)
# }
Run the code above in your browser using DataLab