Skip to contents

An object of class calibrationband contains the calibration band coordinates, the pairs of original observation and forecast values, and the recalibrated forecasts obtained by isotonic regression. The function summary.reliabilitydiag calculates the areas of miscalibration.

Usage

# S3 method for calibrationband
summary(object, ..., iso_test = FALSE, n = 3)

Arguments

object

object of class calibrationband

...

Further arguments to be passed to or from methods.

iso_test

with default = FALSE. If TRUE, the decision of the isotonicity test is reported along side the crossings of the band. If the calibrationband is calculated with nc=TRUE, the bands are re-estimated with nc=FALSE using digits=3. The alpha from the calibrationband is used.

n

number of rows in output table.

Value

A 'summary.reliability' object, which is also a tibble (see tibble::tibble()) with columns:

min_xminimal x-coordinate of misscalibration segment (ordered by length).
max_xmaximal x-coordinate of misscalibration segment (ordered by length).

Examples

set.seed(123)
s=.8
n=10000
x <- sort(runif(n))

p <- function(x,s){p = 1/(1+((1/x*(1-x))^(s+1)));return(p)}
dat <- data.frame(pr=x, y=rbinom(n,1,p(x,s)))

cb <- calibration_bands(x=dat$pr, y=dat$y,alpha=0.05, method="round", digits =3)

summary(cb)
#> 
#>  Areas of misscalibration (ordered by length). In addition there are 8 more. 
#> # A tibble: 11 × 2
#>    min_x max_x
#>    <dbl> <dbl>
#> 1 0.760  0.967
#> 2 0.0724 0.222
#> 3 0.744  0.746
#> # … with 8 more rows
#> # ℹ Use `print(n = ...)` to see more rows
print(summary(cb), n=5)
#> 
#>  Areas of misscalibration (ordered by length). In addition there are 8 more. 
#> # A tibble: 11 × 2
#>    min_x max_x
#>    <dbl> <dbl>
#> 1 0.760  0.967
#> 2 0.0724 0.222
#> 3 0.744  0.746
#> # … with 8 more rows
#> # ℹ Use `print(n = ...)` to see more rows