Learn R Programming

idem (version 5.2)

plot.IDEMDATA: Plot of IDEMDATA object

Description

Generate different types of plots for class IDEMDATA objects.

Usage

# S3 method for 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

Run this code
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");

Run the code above in your browser using DataLab