Learn R Programming

pec (version 2.2.6)

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

Description

Function to extract event probability predictions from various modeling approaches. The most prominent one is the combination of cause-specific Cox regression models which can be fitted with the function cumincCox from the package compRisk. The function predictEventProb is a generic function that means it invokes specifically designed functions depending on the 'class' of the first argument.

Usage

predictEventProb(object, newdata, times, cause, ...)
## S3 method for class 'CauseSpecificCox':
predictEventProb(object, newdata, times, cause, ...)
## S3 method for class 'riskRegression':
predictEventProb(object, newdata, times, cause, ...)
## S3 method for class 'FGR':
predictEventProb(object, newdata, times, cause, ...)
## S3 method for class 'prodlim':
predictEventProb(object, newdata, times, cause, ...)

Arguments

object
A fitted model from which to extract predicted event probabilities
newdata
A data frame containing predictor variable combinations for which to compute predicted event probabilities.
times
A vector of times in the range of the response variable, for which the cumulative incidences event probabilities are computed.
cause
Identifies the cause of interest among the competing events.
...
Additional arguments that are passed on to the current method.

Value

  • A matrix with as many rows as NROW(newdata) and as many columns as length(times). Each entry should be a probability and in rows the values should be increasing.

Details

See predictSurvProb.

See Also

See predictSurvProb.