plot.cuRe: Plot function for Flexible mixture cure model

View source: R/plot.cuRe.R

plot.cuReR Documentation

Plot function for Flexible mixture cure model

Description

Plot function associated with the classes gfcm and cm

Usage

## S3 method for class 'cuRe'
plot(x, newdata = NULL,
        type = c("surv", "probcure", "survuncured", "hazarduncured", "cumhazuncured",
        "densityuncured", "failuncured", "oddsuncured", "loghazarduncured", "hazard",
        "density", "fail", "loghazard", "odds", "cumhaz"), time = NULL, xlim = NULL,
        ylim = c(0, 1), xlab = "Time", ylab = NULL, col = 1, ci = T, add = F, ...)

Arguments

x

Object of class cuRe.

newdata

Data frame from which to compute predictions. If empty, predictions are made on the the data which the model was fitted on.

type

Character. Defines the desired scale to plot. See ?predict.gfcm for possible values.

time

Optional time points at which to compute predictions. This argument is not used if type is curerate.

xlim

Limits of the x-axis.

ylim

Limits of the y-axis.

xlab

Label of the x-axis. Default is "Time".

ylab

Label of the y-axis. If NULL, the function uses its default y-labels depending on object$type and object$excess.

col

Colour of each line.

ci

Logical. If TRUE (default), confidence intervals are added to the plot.

add

Loglca. If TRUE the curve is added to the existing plot.

...

Further arguments passed to plot and lines.

Value

A plot containing the predictions of each observation in newdata.


LasseHjort/cuRe documentation built on July 6, 2023, 1:08 p.m.