Learn R Programming

pec (version 2025.06.24)

Prediction Error Curves for Risk Prediction Models in Survival Analysis

Description

Validation of risk predictions obtained from survival models and competing risk models based on censored data using inverse weighting and cross-validation. Most of the 'pec' functionality has been moved to 'riskRegression'.

Copy Link

Version

Install

install.packages('pec')

Monthly Downloads

9,574

Version

2025.06.24

License

GPL (>= 2)

Maintainer

Thomas Alexander Gerds

Last Published

July 24th, 2025

Functions in pec (2025.06.24)

pecCforest

S3-wrapper function for cforest from the party package
pecRpart

Predict survival based on rpart tree object
pecCtree

S3-Wrapper for ctree.
plot.calibrationPlot

Plot objects obtained with calPlot
plotPredictSurvProb

Plotting predicted survival curves.
plot.pec

Plotting prediction error curves
predictEventProb

Predicting event probabilities (cumulative incidences) in competing risk models.
pec

Prediction error curves
plotPredictEventProb

Plotting predicted survival curves.
predictLifeYearsLost

Predicting life years lost (cumulative cumulative incidences) in competing risk models.
reclass

Retrospective risk reclassification table
simCost

Simulate COST alike data
resolvesplitMethod

Resolve the splitMethod for estimation of prediction performance
print.riskReclassification

Print riskReclassification object
threecity

threecity data
predictSurvProb

Predicting survival probabilities
selectCox

Backward variable selection in the Cox regression model
print.pec

Printing a `pec' (prediction error curve) object.
predictRestrictedMeanTime

Predicting restricted mean time
Special

Drawing bootstrapped cross-validation curves and the .632 or .632plus error of models. The prediction error for an optional benchmark model can be added together with bootstrapped cross-validation error and apparent errors.
cost

Copenhagen Stroke Study
calPlot

Calibration plots for right censored data
GBSG2

German Breast Cancer Study Group 2
crps

Summarizing prediction error curves
coxboost

Formula interface for function CoxBoost of package CoxBoost.
ipcw

Estimation of censoring probabilities
cindex

Concordance index for right censored survival time data
Pbc3

Pbc3 data
R2

Explained variation for survival models