add_confidence {triptych}R Documentation

Adding confidence regions

Description

Confidence regions are supposed to contain the true "parameter" with a given degree of confidence. Here, "parameter" refers to a murphy curve, a reliability curve, or a ROC curve, respectively.

Usage

add_confidence(x, level = 0.9, method = "resampling_cases", ...)

Arguments

x

An object to which a confidence region should be added.

level

A single value for the level of confidence.

method

A string that gives the name of method to generate the confidence regions. Currently, one of: "resampling_cases", "resampling_Bernoulli".

...

Additional arguments passed to methods.

Value

The object given to x, but with information about the confidence regions. This information can be accessed conveniently by using regions() on the curve component of interest.

See Also

resampling_cases(), resampling_Bernoulli()

Examples

data(ex_binary, package = "triptych")

tr <- triptych(ex_binary) |>
  dplyr::slice(1, 9)

# Bootstrap resampling is expensive
# (the number of bootstrap samples is small to keep execution times short)

tr <- add_confidence(tr, level = 0.9, method = "resampling_cases", n_boot = 20)
regions(tr$murphy)
regions(tr$reliability)
regions(tr$roc)


[Package triptych version 0.1.2 Index]