Skip to content

Commit d3bf872

Browse files
author
Florence Bockting
committed
update: remove prob argument from ppc_calibration_overlay functions and update documentation
1 parent 8ce87d8 commit d3bf872

3 files changed

Lines changed: 12 additions & 24 deletions

File tree

R/ppc-calibration.R

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ NULL
9191
#' @rdname PPC-calibration
9292
#' @export
9393
ppc_calibration_overlay <- function(
94-
y, prep, ..., prob = NULL, linewidth = 0.25, alpha = 0.2) {
94+
y, prep, ..., linewidth = 0.25, alpha = 0.2) {
9595
check_ignored_arguments(...)
9696
data <- ppc_calibration_data(y = y, prep = prep, type = "overlay")
9797
params <- .calibration_plot_params(
9898
data = data,
9999
linewidth = linewidth,
100100
show_qdots = FALSE,
101-
prob = 0.95,
101+
prob = NULL,
102102
interval = "consistency",
103103
# currently hardcoded; in future we want to support also "simultaneous"
104104
interval_type = "pointwise"
@@ -123,14 +123,14 @@ ppc_calibration_overlay <- function(
123123
#' @rdname PPC-calibration
124124
#' @export
125125
ppc_calibration_overlay_grouped <- function(
126-
y, prep, group, ..., prob = NULL, linewidth = 0.25, alpha = 0.2) {
126+
y, prep, group, ..., linewidth = 0.25, alpha = 0.2) {
127127
check_ignored_arguments(...)
128128
data <- ppc_calibration_data(y = y, prep = prep, group = group, type = "overlay")
129129
params <- .calibration_plot_params(
130130
data = data,
131131
linewidth = linewidth,
132132
show_qdots = FALSE,
133-
prob = 0.95,
133+
prob = NULL,
134134
interval = "consistency",
135135
# currently hardcoded; in future we want to support also "simultaneous"
136136
interval_type = "pointwise"
@@ -167,10 +167,9 @@ ppc_calibration_overlay_grouped <- function(
167167
#' an object of class `"psis"` that is created when the `loo()` function calls
168168
#' `psis()` internally to do the PSIS procedure. Either `psis_object` or `lw`
169169
#' has to be specified.
170-
#' @param prob Probability used to compute the uncertainty intervals. Is `NULL`
171-
#' for `ppc_calibration_overlay()` and `ppc_calibration_overlay_grouped()`,
172-
#' where no intervals are computed, and defaults to `0.95` for the other
173-
#' calibration functions.
170+
#' @param prob For `ppc_calibration()`, `ppc_calibration_grouped()`,
171+
#' `ppc_loo_calibration()`, and `ppc_loo_calibration_grouped()`. Probability
172+
#' used to compute the uncertainty intervals. Defaults to `0.95`.
174173
#' @param interval For `ppc_calibration()`, `ppc_calibration_grouped()`,
175174
#' `ppc_loo_calibration()`, and `ppc_loo_calibration_grouped()`, pointwise
176175
#' uncertainty interval around the calibration curve. Choose `"confidence"`

man/PPC-calibration.Rd

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

tests/testthat/test-ppc-calibration.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ test_that("ppc_calibration_overlay renders correctly", {
295295
p_custom <- ppc_calibration_overlay(
296296
calib_y,
297297
calib_prep,
298-
prob = .99,
299298
linewidth = 0.5,
300299
alpha = 0.3
301300
)
@@ -314,7 +313,6 @@ test_that("ppc_calibration_overlay_grouped renders correctly", {
314313
calib_y,
315314
calib_prep,
316315
calib_group,
317-
prob = .99,
318316
linewidth = 0.5,
319317
alpha = 0.3
320318
)

0 commit comments

Comments
 (0)