Description Usage Arguments Details
Calibration Analysis of Survival Predictions
1 2 3 |
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
|
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 |
knots |
knots parameter passed to |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.