plot.IDEMDATA: Plot of IDEMDATA object

View source: R/idem_data.R

plot.IDEMDATAR Documentation

Plot of IDEMDATA object

Description

Generate different types of plots for class IDEMDATA objects.

Usage

## S3 method for class 'IDEMDATA'
plot(
  x,
  opt = c("survivor", "missing", "KM"),
  cols = c("black", "blue"),
  fname = NULL,
  ...
)

Arguments

x

A class IDEMDATA object generated by imData

opt

Types of the plot

  • survivor: Spaghetti plot for subjects alive at the end of the study

  • missing: Plot the missing patterns of the observed data

  • KM: Plot Kaplan-Meier survival curves

cols

Curve colors of the treatment and control arm for survival plot or colors of the observed and missing data for missingness plot.

fname

File name of the result pdf file. If fname is null, result pdf file will not be generated

...

Extra arguments for plot

See Also

imData

Examples

rst.data <- imData(abc, trt="TRT", surv="SURV", outcome=c("Y1","Y2"),
                 y0=NULL, endfml="Y2",
                 trt.label = c("UC+SBT", "SAT+SBT"),
                 cov=c("AGE"), duration=365, bounds=c(0,100));
plot(rst.data, opt = "survivor");
plot(rst.data, opt = "missing", cols = c("blue", "gray"));
plot(rst.data, opt = "KM");


idem documentation built on Aug. 9, 2023, 5:08 p.m.