|
5 | 5 | #' @family PPCs
|
6 | 6 | #'
|
7 | 7 | #' @description
|
8 |
| -#' The **bayesplot** PPC module provides various plotting functions for |
9 |
| -#' creating graphical displays comparing observed data to simulated data from |
10 |
| -#' the posterior predictive distribution. See below for a brief discussion of |
11 |
| -#' the ideas behind posterior predictive checking, a description of the |
12 |
| -#' structure of this package, and tips on providing an interface to |
| 8 | +#' The **bayesplot** PPC module provides various plotting functions for creating |
| 9 | +#' graphical displays comparing observed data to simulated data from the |
| 10 | +#' posterior (or prior) predictive distribution. See below for a brief |
| 11 | +#' discussion of the ideas behind posterior predictive checking, a description |
| 12 | +#' of the structure of this package, and tips on providing an interface to |
13 | 13 | #' **bayesplot** from another package.
|
14 | 14 | #'
|
15 | 15 | #' @details
|
|
50 | 50 | #' For a more thorough discussion of posterior predictive checking see
|
51 | 51 | #' Chapter 6 of Gelman et. al. (2013).
|
52 | 52 | #' }
|
| 53 | +#' \subsection{Prior predictive checking}{ |
| 54 | +#' To use **bayesplot** for *prior* predictive checks you can simply use draws |
| 55 | +#' from the prior predictive distribution instead of the posterior predictive |
| 56 | +#' distribution. See Gabry et al. (2019) for more on prior predictive checking |
| 57 | +#' and when it is reasonable to compare the prior predictive distribution to the |
| 58 | +#' observed data. If you want to avoid using the observed data for prior |
| 59 | +#' predictive checks, then the `y` argument to the PPC plotting functions can be |
| 60 | +#' used to provide plausible or implausible `y` values that you want to compare |
| 61 | +#' to the prior predictive realizations. |
| 62 | +#' } |
53 | 63 | #'
|
54 |
| -#' @section PPC plotting functions: The plotting functions for posterior |
55 |
| -#' predictive checking in this package are organized into several categories, |
56 |
| -#' each with its own documentation: |
| 64 | +#' @section PPC plotting functions: The plotting functions for prior and |
| 65 | +#' posterior predictive checking are organized into several categories, each |
| 66 | +#' with its own documentation: |
57 | 67 | #' * [__Distributions__][PPC-distributions]: Histograms, kernel density
|
58 | 68 | #' estimates, boxplots, and other plots comparing the empirical distribution
|
59 |
| -#' of the observed data `y` to the distributions of individual replicated |
60 |
| -#' datasets (rows) in `yrep`. |
61 |
| -#' * [__Statistics__][PPC-test-statistics]: The distribution of a statistic, or a |
62 |
| -#' pair of statistics, over the replicated datasets (rows) in `yrep` compared |
63 |
| -#' to value of the statistic(s) computed from `y`. |
| 69 | +#' of data `y` to the distributions of individual simulated datasets (rows) |
| 70 | +#' in `yrep`. |
| 71 | +#' * [__Statistics__][PPC-test-statistics]: The distribution of a statistic, |
| 72 | +#' or a pair of statistics, over the simulated datasets (rows) in `yrep` |
| 73 | +#' compared to value of the statistic(s) computed from `y`. |
64 | 74 | #' * [__Intervals__][PPC-intervals]: Interval estimates of `yrep` with `y`
|
65 | 75 | #' overlaid. The x-axis variable can be optionally specified by the user
|
66 | 76 | #' (e.g. to plot against against a predictor variable or over time).
|
67 | 77 | #' * [__Predictive errors__][PPC-errors]: Plots of predictive errors
|
68 |
| -#' (`y - yrep`) computed from `y` and replicated datasets (rows) in `yrep`. |
69 |
| -#' For binomial models binned error plots are also available. |
| 78 | +#' (`y - yrep`) computed from `y` and eachc of the simulated datasets (rows) |
| 79 | +#' in `yrep`. For binomial models binned error plots are also available. |
70 | 80 | #' * [__Scatterplots__][PPC-scatterplots]: Scatterplots (and similar
|
71 |
| -#' visualizations) of the observed data `y` vs. individual replicated datasets |
72 |
| -#' (rows) in `yrep`, or vs. the average value of the distributions of each data |
73 |
| -#' point (columns) in `yrep`. |
| 81 | +#' visualizations) of the data `y` vs. individual simuluted datasets |
| 82 | +#' (rows) in `yrep`, or vs. the average value of the distributions of each |
| 83 | +#' data point (columns) in `yrep`. |
74 | 84 | #' * [__Plots for discrete outcomes__][PPC-discrete]: PPC functions that can
|
75 | 85 | #' only be used if `y` and `yrep` are discrete. For example, rootograms for
|
76 | 86 | #' count outcomes and bar plots for ordinal, categorical, and
|
77 | 87 | #' multinomial outcomes.
|
78 | 88 | #' * [__LOO predictive checks__][PPC-loo]: PPC functions for predictive checks
|
79 | 89 | #' based on (approximate) leave-one-out (LOO) cross-validation.
|
80 | 90 | #'
|
81 |
| -#' @section Providing an interface for posterior predictive checking from another package: |
| 91 | +#' @section Providing an interface for predictive checking from another package: |
82 | 92 | #'
|
83 | 93 | #' In addition to the various plotting functions, the **bayesplot** package
|
84 | 94 | #' provides the S3 generic [pp_check()]. Authors of \R packages for
|
|
0 commit comments