|
60 | 60 | #' \code{\link{pp_check}} for graphical posterior predictive checks. |
61 | 61 | #' |
62 | 62 | #' @examples |
| 63 | +#' \donttest{ |
63 | 64 | #' # Use rstanarm example model |
64 | 65 | #' if (!exists("example_model")) example(example_model) |
65 | 66 | #' fit <- example_model |
|
78 | 79 | #' plot(fit, "areas", regex_pars = "period", |
79 | 80 | #' prob = 0.5, prob_outer = 0.9) |
80 | 81 | #' |
81 | | -#' \donttest{ |
82 | 82 | #' # Make the same plot by extracting posterior draws and calling |
83 | 83 | #' # bayesplot::mcmc_areas directly |
84 | 84 | #' x <- as.array(fit, regex_pars = "period") |
85 | 85 | #' bayesplot::mcmc_areas(x, prob = 0.5, prob_outer = 0.9) |
86 | | -#' } |
87 | 86 | #' |
88 | 87 | #' |
89 | 88 | #' ################################## |
|
139 | 138 | #' # changing facet layout |
140 | 139 | #' plot(fit, "trace", pars = c("(Intercept)", "period2"), |
141 | 140 | #' facet_args = list(nrow = 2)) |
142 | | -#' \donttest{ |
143 | 141 | #' # same plot by calling bayesplot::mcmc_trace directly |
144 | 142 | #' x <- as.array(fit, pars = c("(Intercept)", "period2")) |
145 | 143 | #' bayesplot::mcmc_trace(x, facet_args = list(nrow = 2)) |
146 | | -#' } |
147 | 144 | #' |
148 | 145 | #' |
149 | 146 | #' ############ |
|
155 | 152 | #' plot(fit, regex_pars = "herd:[279]") |
156 | 153 | #' plot(fit, regex_pars = "herd:[279]|period2") |
157 | 154 | #' plot(fit, regex_pars = c("herd:[279]", "period2")) |
158 | | -#' |
| 155 | +#' } |
159 | 156 | #' |
160 | 157 | #' # For graphical posterior predictive checks see |
161 | 158 | #' # help("pp_check.stanreg") |
|
0 commit comments