Skip to contents

Given an input data.frame, create the corresponding observed-expected plot with option upper and lower warning limits and optional upper and lower action limits

Usage

createObservedMinusExpectedPlot(
  data,
  indexVar = SubjectIndex,
  upperActionLimit = UpperActionLimit,
  lowerActionLimit = LowerActionLimit,
  upperWarningLimit = UpperWarningLimit,
  lowerWarningLimit = LowerWarningLimit,
  warningQuantiles = c(lower = 0.01, upper = 0.99),
  permittedRates = c(lower = 0.05, upper = 0.15)
)

Arguments

data

The input data.frame

indexVar

The column in data that defines the sequence in which participants enrolled. Should be an integer vector with values from 1 to n, where n is the number of participants enrolled.

upperActionLimit

The column in data that defines the upper action limit. If NULL, the upper action limit is omitted from the plot.

lowerActionLimit

The column in data that defines the lower action limit. If NULL, the lower action limit is omitted from the plot.

upperWarningLimit

The column in data that defines the upper warning limit. If NULL, the upper warning limit is omitted from the plot.

lowerWarningLimit

The column in data that defines the lower warning limit. If NULL, the lower warning limit is omitted from the plot.

warningQuantiles

A named numeric vector with elements upper and lower containing the quantiles of the binomial distribution that define the warning limits. Used only for labelling. If NULL, the corresponding footer is omitted from the plot. Individual elements may be NA.

permittedRates

A named numeric vector with elements upper and lower containing the observed event rates that define the action limits. Used only for labelling. If NULL, the corresponding footer is omitted from the plot. Individual elements may be NA.