cal: Calibration Indices

Description Usage Arguments Value Examples

Description

Get summary calibration indices for binary outcomes and class probabilities. Optionally, get bootstrap-based confidence intervals using validation data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
cal_ind(
  data,
  y,
  p,
  val = NULL,
  conf.int = FALSE,
  level = 0.95,
  na.rm = FALSE,
  span = 0.75,
  ...
)

cal_ICI(p, p.calibrate)

cal_E50(p, p.calibrate)

cal_E90(p, p.calibrate)

cal_Emax(p, p.calibrate)

Arguments

data

Data frame.

y

Binary outcome.

p

Probabilites.

val

Data frame.

conf.int

Logical. Default is FALSE.

level

Confidence level. Default is 0.95.

na.rm

Logical. Default is FALSE.

span

Passed on to loess.

...

Arguments passed on to bootstraps.

p.calibrate

Calibrated predictions.

Value

A tibble with as many rows and calibration indices. The number of columns can vary based on whether confident intervals are requested.

Examples

1
2
dd <- data.frame(y = rbinom(50, 1, 0.5), p = runif(100, 0, 1))
cal_ind(dd, y, p)

mattwarkentin/precogs documentation built on Jan. 12, 2020, 6:24 p.m.