summary.pmcalibration: Summarize a pmcalibration object

View source: R/utils.R

summary.pmcalibrationR Documentation

Summarize a pmcalibration object

Description

Summarize a pmcalibration object

Usage

## S3 method for class 'pmcalibration'
summary(object, conf_level = 0.95, ...)

Arguments

object

object created with pmcalibration

conf_level

width of the confidence interval (0.95 gives 95% CI). Ignored if call to pmcalibration didn't request confidence intervals

...

ignored

Value

prints a summary of calibration metrics. Returns a list of two tables: metrics and plot

Examples

library(pmcalibration)
# simulate some data with a binary outcome
n <- 500
dat <- sim_dat(N = n, a1 = .5, a3 = .2)
head(dat)
# predictions
p <- with(dat, invlogit(.5 + x1 + x2 + x1*x2*.1))

# fit calibration curve
cal <- pmcalibration(y = dat$y, p = p, smooth = "gam", k = 20, ci = "pw")

summary(cal)

pmcalibration documentation built on Sept. 8, 2023, 5:10 p.m.