Skip to content

Commit 3ba7489

Browse files
committed
Add examples for extrapolation_factor parameter in ppc_km_overlay
1 parent 6d71247 commit 3ba7489

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

R/ppc-censoring.R

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
#' \donttest{
5454
#' ppc_km_overlay(y, yrep[1:25, ], status_y = status_y)
5555
#' }
56+
#' # With extrapolation_factor = 1 (no extrapolation)
57+
#' \donttest{
58+
#' ppc_km_overlay(y, yrep[1:25, ], status_y = status_y, extrapolation_factor = 1)
59+
#' }
60+
#' # With extrapolation_factor = Inf (show all posterior predictive draws)
61+
#' \donttest{
62+
#' ppc_km_overlay(y, yrep[1:25, ], status_y = status_y, extrapolation_factor = Inf)
63+
#' }
5664
#' # With separate facets by group:
5765
#' group <- example_group_data()
5866
#' \donttest{
@@ -83,10 +91,10 @@ NULL
8391
#' no left-truncation is assumed.
8492
#' @param extrapolation_factor A numeric value (>=1) that controls how far the
8593
#' plot is extended beyond the largest observed value in `y`. The default
86-
#' value is 1.2, which corresponds to 20 % extrapolation. To display all
87-
#' posterior predictive draws, set `extrapolation_factor = Inf`.
88-
#' Note that the plot is never extrapolated further than the largest
89-
#' value in `yrep`.
94+
#' value is 1.2, which corresponds to 20 % extrapolation. Note that all
95+
#' posterior predictive draws may not be shown by default because of
96+
#' the controlled extrapolation. To display all posterior predictive draws,
97+
#' set `extrapolation_factor = Inf`.
9098
#'
9199
ppc_km_overlay <- function(
92100
y,

0 commit comments

Comments
 (0)