plot.LocalControlCR: Plot cumulative incidence functions (CIFs) from Local...

Description Usage Arguments Examples

View source: R/localControl.R

Description

Given the results from LocalControl with outcomeType = "survival", plot a corrected and uncorrected cumulative incidence function (CIF) for both groups.

Usage

1
2
3
4
5
## S3 method for class 'LocalControlCR'
plot(x, ..., rad2plot, xlim, ylim = c(0, 1),
  col1 = "blue", col0 = "red", xlab = "Time",
  ylab = "Cumulative incidence", legendLocation = "topleft", main = "",
  group1 = "Treatment 1", group0 = "Treatment 0")

Arguments

x

Return object from LocalControl with outcomeType = "survival".

...

Arguments passed on to graphics::plot

rad2plot

The index or name ("rad_#") of the radius to plot. By default, the radius with pct_informative closest to 0.8 will be selected.

xlim

The x axis bounds. Defaults to c(0, max(lccrResults$Failtimes)).

ylim

The y axis bounds. Defaults to c(0,1).

col1

The plot color for group 1.

col0

The plot color for group 0.

xlab

The x axis label. Defaults to "Time".

ylab

The y axis label. Defaults to "Cumulative incidence".

legendLocation

The location to place the legend. Default "topleft".

main

The main plot title. Default is empty.

group1

The name of the primary group (Treatment 1).

group0

The name of the secondary group (Treatment 0).

Examples

1
2
3
4
5
6
7
8
9
data("cardSim")
results = LocalControl(data = cardSim,
                       outcomeType = "survival",
                       outcomeColName = "status",
                       timeColName = "time",
                       treatmentColName = "drug",
                       treatmentCode = 1,
                       clusterVars = c("age", "bmi"))
plot(results)

OHDSI/LocalControl documentation built on July 13, 2018, 3:21 p.m.