plot.libsl {survivalSL}R Documentation

Calibration Plot for a Cox-like Model

Description

A calibration plot of an object of the class libsl (library of survival super learner).

Usage

## S3 method for class 'libsl'
plot(x, n.groups=5, pro.time=NULL,
newdata=NULL, times=NULL, failures=NULL, ...)

Arguments

x

An object returned by a library of survival super learner.

n.groups

A numeric value with the number of groups by their class probabilities. The default is 5.

pro.time

The prognostic time at which the calibration plot of the survival probabilities.

newdata

An optional data frame containing the new sample for validation with covariate values, follow-up times, and event status. The default value is NULL, the calibration plot is performed from the same subjects of the training sample.

times

The name of the variable related the numeric vector with the follow-up times in newdata (optional argument only necessary when newdata is not NULL).

failures

The name of the variable related the numeric vector with the event indicators (0=right censored, 1=event) in newdata (optional argument only necessary when newdata is not NULL).

...

Additional arguments affecting the plot.

Details

The plot represents the observed survival and the related 95% confidence intervals, which are respectively estimated by the Kaplan and Meier estimator and the Greenwood formula, against the mean of the predictive values for individuals stratified into groups of the same size according to the percentiles. The identity line is usually included for reference.

Value

No return value for this S3 method.

See Also

plot.default

Examples

data(dataDIVAT2)

# The estimation of the model from the first 200 lignes
model <- LIB_COXall(times="times", failures="failures", data=dataDIVAT2,
  cov.quanti=c("age"),  cov.quali=c("hla", "retransplant", "ecd"))

# The calibration plot from the validation sample of 150 patients
plot(model, n.groups=5, pro.time=12, col=3,
     xlab="Predicted 12-year survival", ylab="Observed 12-year survival",
     newdata=dataDIVAT2[151:300,], times="times", failures="failures")

[Package survivalSL version 0.94 Index]