plot.DTR {DTR}R Documentation

Plot method for DTR objects

Description

Plot the survival estimates and their 95% confidence bands for each dynamic treatment regime

Usage

## S3 method for class 'DTR'
plot(x, confidence.interval = FALSE, 
xlab = "Time", ylab = "Survival probability", 
line.color = c("black", "grey40", "grey60", "grey80"), 
legend.position = "right", censored=FALSE, ...)

Arguments

x

an object of class DTR, usually returned by the LDTestimate function or WRSEestimate function.

confidence.interval

If confidence.interval=FALSE (default), the 95% confidence bands are not plotted. If confidence.interval=TRUE, the 95% confidence bands are plotted as shadows.

xlab

label given to the x-axis. Default is "Time".

ylab

label given to the y-axis. Default is "Survival probability".

line.color

colors for the lines. Default are "black", "grey40", "grey60", and "grey80" for A1B1, A1B2, A2B1, and A2B2 respectively.

legend.position

the position of legend: "left", "right" (default), "bottom", "top", or two-element numeric vector (e.g. c(0.6,0.9))

censored

If censored=FALSE (default), the censoring ticks are not plotted. If censored=TRUE, the censoring times are plotted as ticks

...

for future methods

See Also

DTR.object, print.DTR, summary.DTR, print.summary.DTR

Examples

## Not run: 
data("LDTdata")
est <- LDTestimate(data=LDTdata)
plot(est, confidence.interval=TRUE, censored=TRUE)

data("WRSEdata")
est <- WRSEestimate(data=WRSEdata)
plot(est)
## End(Not run)

[Package DTR version 1.7 Index]