resampling_Bernoulli {triptych} | R Documentation |
Bootstrap (binary) observation resampling for triptych objects
Description
This function is intended to be called from add_consistency()
or add_confidence()
,
by specifying "resampling_Bernoulli"
in the respective method
argument.
Usage
resampling_Bernoulli(x, level = 0.9, n_boot = 1000, ...)
## S3 method for class 'triptych_murphy'
resampling_Bernoulli(x, level = 0.9, n_boot = 1000, ...)
## S3 method for class 'triptych_reliability'
resampling_Bernoulli(
x,
level = 0.9,
n_boot = 1000,
position = c("diagonal", "estimate"),
...
)
## S3 method for class 'triptych_roc'
resampling_Bernoulli(x, level = 0.9, n_boot = 1000, ...)
Arguments
x |
One of the triptych objects. |
level |
A single value that determines which quantiles of
the bootstrap sample to return. These quantiles envelop |
n_boot |
The number of bootstrap samples. |
... |
Additional arguments passed to other methods. |
position |
Either |
Details
Bootstrap (binary) observation resampling assumes conditionally independent observations given the forecast value. A given number of bootstrap samples are the basis for pointwise computed confidence/consistency intervals. For every bootstrap sample, we sample observations from a Bernoulli distribution conditional on (recalibrated) forecast values.
Value
A list of tibbles that contain the information to draw confidence regions.
The length is equal to the number of forecasting methods in x
.
Examples
data(ex_binary, package = "triptych")
# Bootstrap resampling is expensive
# (the number of bootstrap samples is small to keep execution times short)
tr_consistency <- triptych(ex_binary) |>
dplyr::slice(1, 9) |>
add_consistency(level = 0.9, method = "resampling_Bernoulli", n_boot = 20)
tr_confidence <- triptych(ex_binary) |>
dplyr::slice(1, 9) |>
add_confidence(level = 0.9, method = "resampling_Bernoulli", n_boot = 20)