survCalibCurve: Calibration Analysis of Survival Predictions

Description Usage Arguments Details

Description

Calibration Analysis of Survival Predictions

Usage

1
2
3
survCalibCurve(data, time, event, p, timepoint, showCStat = TRUE,
  p.out = NULL, na.rm = FALSE, bs.knots = c(0.01, 0.025, 0.05, 0.1, 0.2,
  0.3), bs.degree = 3)

Arguments

data

A dataset

time

unquoted name of the time variable

event

unquoted name of the event variable (0/1)

p

unquoted name of the variable containing predicted probabilities (at t=timepoint)

timepoint

Value of 'time' where probabilities are extracted (from the Kaplan-Meier curves).

showCStat

Logical. If TRUE, a concordance statistic (from rms::somers2()) with confidence limits (2 std. errors) will be displayed

p.out

grid of predicted probability values at which calibration curve is estimated. If NULL, a sequence of 10 values evenly spaced along the range of inputted predicted probabilities is generated.

na.rm

Logical. Remove rows with missing values?

bs.degree

degree parameter passed to splines::bs()

knots

knots parameter passed to splines::bs()

Details

The predicted probabilities are transform via the logit prior to spline curve fitting, in order to stabilize the resulting calibration curve estimates. Therefore, if specifying the knots= parameter to bs.params, the values must be expressed on the logit scale. (It's usually easier/sufficient to just supply df instead of knots.)

Spline fits in Cox proportional hazards model are prone to minor convergence issues, which impact the validity of Wald-based standard errors, tests, and confidence intervals. Hence this may produce a warning of the form "Loglik converged before variable X; beta may be infinite". See https://stat.ethz.ch/pipermail/r-help/2008-September/174201.html for details.

The user is advised to choose the knots for the splines very carefully, especially in the presence of highly skewed distributions of model-predicted probabilities. The default values are just a suggestion for a typical scenario where predictions are highly skewed to the right.


jarrod-dalton/calibrateR documentation built on May 25, 2019, 6:22 p.m.