Skip to content

Commit 7e6b759

Browse files
committed
Add roxygen template for prob,prob_outer
1 parent e96c6ca commit 7e6b759

File tree

6 files changed

+18
-24
lines changed

6 files changed

+18
-24
lines changed

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Geom more appropriate for discrete data. (#145)
2222
and [LOO predictive checks](http://mc-stan.org/bayesplot/reference/PPC-loo.html)
2323
now draw both an outer and an inner probability interval, which can be
2424
controlled through the new argument `prob_outer` and the already existing
25-
`prob`, consistently with what is produced by `mcmc_intervals()` and similar.
26-
(#154, @mcol)
25+
`prob`. This is consistent with what is produced by `mcmc_intervals()`.
26+
(#152, #154, @mcol)
27+
2728

2829
# bayesplot 1.5.0
2930

R/ppc-intervals.R

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@
77
#' @family PPCs
88
#'
99
#' @template args-y-yrep
10+
#' @template args-prob-prob_outer
1011
#' @param x A numeric vector the same length as \code{y} to use as the x-axis
1112
#' variable. For example, \code{x} could be a predictor variable from a
1213
#' regression model, a time variable for time-series models, etc. If \code{x}
1314
#' is missing or NULL, then \code{1:length(y)} is used for the x-axis.
1415
#' @param ... Currently unused.
15-
#' @param prob A value between 0 and 1 indicating the desired probability mass
16-
#' to include in the inner \code{yrep} intervals. The default is 0.5.
17-
#' @param prob_outer The probability mass to include in the outer \code{yrep}
18-
#' interval. The default is 0.9.
1916
#' @param alpha,size,fatten Arguments passed to geoms. For ribbon plots
2017
#' \code{alpha} and \code{size} are passed to
2118
#' \code{\link[ggplot2]{geom_ribbon}}. For interval plots \code{size} and

R/ppc-loo.R

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@
9090
#'
9191
#' # loo predictive intervals vs observations
9292
#' keep_obs <- 1:50
93-
#' ppc_loo_intervals(y, yrep, psis_object = psis1, subset = keep_obs, prob = 0.9)
93+
#' ppc_loo_intervals(y, yrep, psis_object = psis1, subset = keep_obs)
9494
#'
9595
#' color_scheme_set("gray")
9696
#' ppc_loo_intervals(y, yrep, psis_object = psis1, subset = keep_obs,
97-
#' order = "median", prob = 0.9)
97+
#' order = "median")
9898
#' }
9999
#'
100100
NULL
@@ -265,13 +265,10 @@ ppc_loo_pit <-
265265

266266
#' @rdname PPC-loo
267267
#' @export
268+
#' @template args-prob-prob_outer
268269
#' @param psis_object If using \pkg{loo} version \code{2.0.0} or greater, an
269270
#' object returned by the \code{psis} function (or by the \code{loo} function
270271
#' with argument \code{save_psis} set to \code{TRUE}).
271-
#' @param prob A value between 0 and 1 indicating the desired probability mass
272-
#' to include in the inner interval. The default is 0.5.
273-
#' @param prob_outer The probability mass to include in the outer interval.
274-
#' The default is 0.9.
275272
#' @param intervals For \code{ppc_loo_intervals} and \code{ppc_loo_ribbon},
276273
#' optionally a matrix of precomputed LOO predictive intervals
277274
#' that can be specified instead of \code{yrep} and \code{lw} (these are both

man-roxygen/args-prob-prob_outer.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#' @param prob,prob_outer Values between 0 and 1 indicating the desired
2+
#' probability mass to include in the inner and outer intervals. The defaults
3+
#' are \code{prob=0.5} and \code{prob_outer=0.9}.

man/PPC-intervals.Rd

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/PPC-loo.Rd

Lines changed: 5 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)