Learn R Programming

CalibrationCurves: assessing the agreement between observed outcomes and predictions.

Package to generate (generalized) calibration curves and related statistics. The function for the logistic/flexible calibration curves are based on the val.prob function from Frank Harrell's rms package.

Installation

On current R (>= 3.0.0)

  • You can install the latest development version from Github using the code below
library("devtools")
install_github("BavoDC/CalibrationCurves", dependencies = TRUE, build_vignettes = TRUE, ref = "master")

This requires devtools >= 1.6.1, and installs the "master" branch. This approach builds the package from source.

Documentation

The basic functionality of the package is explained and demonstrated in the vignette, which you can access using

vignette("CalibrationCurves")

or via the homepage of the package.

Contact

If you have questions, remarks or suggestions regarding the package, you can contact me at bavo.campo@kuleuven.be (all emails to bavo.decock@kuleuven.be are forwarded to this one).

Citation

If you use this package, please cite:

  • BarreƱada, L., De Cock Campo, B., Wynants, L., Van Calster, B. (2025). Clustered Flexible Calibration Plots for

Binary Outcomes Using Random Effects Modeling. arXiv:2503.08389, available at https://arxiv.org/abs/2503.08389.

  • De Cock Campo, B. (2023). Towards reliable predictive analytics: a generalized calibration framework.

arXiv:2309.08559, available at https://arxiv.org/abs/2309.08559.

  • De Cock, B., Nieboer, D., Van Calster, B., Steyerberg, E.W., Vergouwe, Y. (2023). The CalibrationCurves package: assessing the agreement between observed outcomes and predictions. R package version 2.0.3, doi:10.32614/CRAN.package.CalibrationCurves, available at https://cran.r-project.org/package=CalibrationCurves
  • Van Calster, B., Nieboer, D., Vergouwe, Y., De Cock, B., Pencina, M.J., Steyerberg, E.W. (2016). A calibration hierarchy for risk models was defined: from utopia to empirical data. Journal of Clinical Epidemiology, 74, pp. 167-176

Copy Link

Version

Install

install.packages('CalibrationCurves')

Monthly Downloads

12,545

Version

3.0.0

License

GPL (>= 3)

Maintainer

De Cock Bavo

Last Published

December 9th, 2025

Functions in CalibrationCurves (3.0.0)

valProbCluster

Calibration performance with cluster adjustment (ggplot version)
valProbggplot

Calibration performance: ggplot version
valProbSurvival

Plot a calibration curve for a Cox Proportional Hazards model
simulatedpoissondata

Simulated data sets to illustrate the package functionality
print.ggplotCalibrationCurve

Print function for a ggplotCalibrationCurve object
.rcspline.plot

Internal function
simulatedclustereddata

Simulated data sets to illustrate the package functionality
CGC

Internal function for the Clustered Grouped Calibration Curve (CGC)
CalibrationCurves

General information on the package and its functions
MAC2

Internal function for the Meta-Analytical Calibration Curve (MAC2)
%{}%

Infix operator to run background jobs
LibraryM

Function to load multiple packages at once
genCalCurve

Calibration performance using the generalized calibration framework
print.SurvivalCalibrationCurve

Print function for a SurvivalCalibrationCurve object
print.GeneralizedCalibrationCurve

Print function for a GeneralizedCalibrationCurve object
simulatedsurvivaldata

Breast Cancer Survival Data from Rotterdam and Germany
print.CalibrationCurve

Print function for a CalibrationCurve object
print.ClusteredCalibrationCurve

Print function for a ClusteredCalibrationCurve object
%<=%

Infix operator to run background jobs
MIXC

Internal function for the Mixed-Effects Model Calibration Curve (MIXC)
simulateddata

Simulated data sets to illustrate the package functionality
val.prob.ci.2

Calibration performance
auc.nonpara.mw

AUC Based on the Mann-Whitney Statistic