plot.sl.time: Caliration Plot for Super Learner

View source: R/plot.sl.time.R

plot.sl.timeR Documentation

Caliration Plot for Super Learner

Description

A calibration plot of a Super Learner obtained by the function sl.time.

Usage

## S3 method for class 'sl.time'
plot(x, ..., col, lty, lwd, type, pch, ylab, xlab, ylim, xlim, 
   method, n.groups, pro.time, newdata, times, failures)

Arguments

x

An object returned by the function sl.time.

...

Additional arguments affecting the plot.

col

A numeric value with the color of the survival curves. The default is 1 for black.

lty

A numeric value with the type of the survival curves. The default is 1.

lwd

A numeric value with the type of the survival curves. The default is 1.

type

A character string giving the type of plot desired. The default is "b" for both the lines and points

pch

A numeric value for plotting characters or symbols. The default is 16.

xlab

The label for the x axis. The default is "Predicted survival".

ylab

The label for the y axis. The default is "Observed survival".

xlim

A vector with the x limits of the plot.

ylim

A vector with the y limits of the plot.

method

A character string with the name of the algorithm included in the SL for wich the calibration plot is performed. The defaut is "sl" for the 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 wich the calibration plot of the survival probabilities.

newdata

An optional data frame containing the new sample for validation with covariate values, folow-up times, and event status. The default value isNULL, 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).

Author(s)

Yohann Foucher <Yohann.Foucher@univ-poitiers.fr>

Camille Sabathe <camille.sabathe@univ-nantes.fr>

Examples


data(dataDIVAT2)

#The outcome model base on a Super Learner from the first 150 individuals of the data base
sl1<-sl.time( methods=c("aft.gamma", "ph.gompertz"),  metric="ibs",
  data=dataDIVAT2[1:150,],  times="times", failures="failures", group="ecd",
  cov.quanti=c("age"),  cov.quali=c("hla", "retransplant"), cv=3)

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


RISCA documentation built on March 31, 2023, 11:06 p.m.

Related to plot.sl.time in RISCA...