plot.LRfit {WA} | R Documentation |
Plot the estimated survival-completed cumulative loss curve
Description
Plot the estimated survival-completed cumulative loss (while-alive loss rate times the length of follow-up) as a function of the time horizon.
Usage
## S3 method for class 'LRfit'
plot(
x,
group = NULL,
conf = FALSE,
main = NULL,
xlim = NULL,
ylim = NULL,
xlab = "Follow-up time",
ylab = "Survival-completed cumulative loss",
group.col = NULL,
conf.lty = 3,
lwd = 2,
legend = TRUE,
...
)
Arguments
x |
An object returned by |
group |
Specifies the group to be plotted. |
conf |
If TRUE, 95% confidence limits for the target curve are overlaid. |
main |
A main title for the plot. |
xlim |
The x limits of the plot. |
ylim |
The y limits of the plot. |
xlab |
A label for the x axis, defaults to a description of x. |
ylab |
A label for the y axis, defaults to a description of y. |
group.col |
A vector of colors for the group-specific curves; must be commensurate with the number of groups. |
conf.lty |
Line type for the confidence limits if |
lwd |
Line width. |
legend |
If TRUE, a crude legend for the group-specific curves will appear on the bottom right corner of the graph. |
... |
Other arguments that can be passed to the underlying |
Value
No return value, called for side effects.
See Also
Examples
# load the HF-ACTION trial data
head(hfaction_cpx12)
# fit the data
dat<-hfaction_cpx12
obj<-LRfit(dat$id,dat$time,dat$status,dat$trt)
# print the event numbers by group
obj
# summarize the inference results for tau=3.5 years
# with joint test with RMST
summary(obj,tau=3.5,joint.test=TRUE)
# plot the estimated survival-completed cumulative loss
# by group, with 95% confidence intervals
plot(obj,conf=TRUE,xlab="Time (years)",xlim=c(0, 3.5),ylim=c(0,3),
ylab="Survival-completed cumulative frequency")