Skip to contents

Confidence bands for monotone probabilities

Usage

calibration_bands(
  x,
  y,
  alpha = 0.05,
  method = "standard",
  digits = NULL,
  nc = FALSE
)

Arguments

x

covariate.

y

response variable (in 0,1).

alpha

type one error probability (1 minus the confidence level).

method

"standard" for the original method proposed in the article, "round" for rounding the covariate, or "YB" for the bounds by Yang & Barber (2019).

digits

number of digits for method "round". Default is 2. Has no effect for the other methods.

nc

use non-crossing bands for method "standard" or "round". Has no effect for method "YB". Default is FALSE. See also "summary(...,iso_test=TRUE)" in this context. Crossings allow to reject the null hypothesis of monotonicity in the calibration curve.

Value

An object of class calibrationband, which is a list containing the following entries:

bandsa tibble holding x,lwr,upr the lower and upper bound, for each value of x. The upper bound extends to the left and the lower bound to the right, that is, the upper bound for x[i]<s<x[i+1] is upr[i+1], and the lower bound for x[i]<s<x[i+1] is lwr[i].
cala tibble holding the areas/segments of calibration (out=0) and miscalibration (out=1).
binsa tibble of the characteristics of the isotonic bins.
casestibble of all predictions and observations. In addition it holds the column isoy, which is the isotonic regression of y at points x.
alphathe given type one error probability (1 minus the nominal coverage of the band).
methodthe selected method for computing the band.
ncthe selected method for non-crossing.
digitsthe given digits for method "round" (or NULL for method "standard").
timetime to compute the upper and lower band.