plot.LRfit: Plot the estimated survival-completed cumulative loss curve

Description Usage Arguments Value See Also Examples

View source: R/generic.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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 LRfit.

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 conf=TRUE.

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 plot method.

Value

No return value, called for side effects.

See Also

LRfit, summary.LRfit.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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")

WA documentation built on Nov. 18, 2021, 1:10 a.m.