Calculate prediction error curves


Calculation of prediction error curve from a survival response and predicted probabilities of survival.


pmpec(object, response=NULL, x=NULL, times, model.args=NULL, 
    type=c("PErr","NoInf"), external.time=NULL, external.status=NULL, 



fitted model of a class for which the interface function predictProb.class is available.


Either a survival object (with Surv(time, status), where time is an n-vector of censored survival times and status an n-vector containing event status, coded with 0 and 1) or a matrix with columns time containing survival times and status containing integers, where 0 indicates censoring, 1 the interesting event and larger numbers other competing risks.


n*p matrix of covariates.


vector of time points at which the prediction error is to be estimated.


named list of additional arguments, e.g. complexity value, which are to be passed to predictProb function.


type of output: Estimated prediction error (default) or no information error (prediction error obtained by permuting the data).


optional vector of time points, used for censoring distribution.


optional vector of status values, used for censoring distribution.


Data frame containing n-vector of observed times ('time'), n-vector of event status ('status') and n*p matrix of covariates (remaining entries). Alternatively to response and x, for compatibility to pec.


Prediction error of survival data is measured by the Brier score, which considers the squared difference of the true event status at a given time point and the predicted event status by a risk prediction model at that time. A prediction error curve is the weighted mean Brier score as a function of time at time points in times (see References).

pmpec requires a predictProb method for the class of the fitted model, i.e. for a model of class class predictProb.class.

pmpec is implemented to behave similar to function pec of package pec, which provides several predictProb methods.

In bootstrap framework, data contains only a part of the full data set. For censoring distribution, the full data should be used to avoid extreme variance in case of small data sets. For that, the observed times and status values can be passed as argument external.time and external.status.


Vector of prediction error estimates at each time point given in time.


Harald Binder


Gerds, A. and Schumacher, M. (2006) Consistent estimation of the expected Brier score in general survival models with right-censored event times. Biometrical Journal, 48, 1029–1040.

Schoop, R. (2008) Predictive accuracy of failure time models with longitudinal covariates. PhD thesis, University of Freiburg.

See Also

predictProb, pec

Want to suggest features or report bugs for Use the GitHub issue tracker. Vote for new features on Trello.

comments powered by Disqus