eReport: Event Report

Description Usage Arguments Details Author(s) Examples

View source: R/eReport.r

Description

Generates graphics for binary event proportions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
eReport(
  formula,
  data = NULL,
  subset = NULL,
  na.action = na.retain,
  exposure = NULL,
  expunit = "",
  study = " ",
  refgroup = NULL,
  minincidence = 0,
  conf.int = 0.95,
  etype = "adverse events",
  head = NULL,
  tail = NULL,
  h = 6,
  w = 7,
  popts = NULL
)

Arguments

formula

a formula with one or two left hand variables (the first representing major categorization and the second minor), and 1-2 right hand variables. One of the right hand variables may be enclosed in id() to indicate the presence of a unique subject ID. The remaining variable is treatment.

data

input data frame

subset

subsetting criteria

na.action

function for handling NAs when creating analysis frame

exposure

a numeric vector whose length is the number of treatments, with names equal to the treatment names

expunit

character string specifying the time units for exposure

study

character string identifying the study; used in multi-study reports or where distinct patient strata are analyzed separately. Used to fetch the study-specific metadata stored by sethreportOption. Single study reports just use study=' '.

refgroup

a character string specifying which treatment group is subtracted when computing risk differences. If there are two treatments the default is the first one listed in hreport options.

minincidence

a number between 0 and 1 specifying the minimum incidence in any stratum that must hold before an event is included in the summary. When exposure is given, minincidence applies to the hazard rate.

conf.int

confidence level for difference in proportions (passed to dotchartpl)

etype

a character string describing the nature of the events, for example "adverse events", "serious adverse events". Used in figure captions.

head

character string. Specifies initial text in the figure caption, otherwise a default is used.

tail

a character string to add to end of automatic caption

h

height of graph

w

width of graph

popts

a list of additional options to pass to dotchartpl

Details

Generates dot charts showing proportions of subjects having events (at any time). Events can be categorized by a single level or by major and minor levels (e.g., body system and preferred terms). When there are two treatments, half-width CLs of treatment differences are drawn, centered at the midpoint of the two proportions, and CLs for differences appear in hover text. Input data must contain one record per event, with this record containing the event name. If there is more than one event of a given type per subject, unique subject ID must be provided. Denominators come from hreport options when computing event incidence proportions. Instead, when a named vector exposure is specified, with names equal to the treatments, exposure is used as the denominator so that the exponential distribution hazard rate is computed, i.e., events per unit of exposure time. When a subject has only one event of each type, the usual interpretation holds. When a subject has multiple events, the estimate is events per person per time unit. A character variable expunit defines the time units. It is assumed that only randomized subjects are included in the dataset. Whenever the number of events of a given type is zero for a group, the event frequency is changed to 0.5 so that one may compute confidence intervals on the log scale as well as hazard ratios.

Author(s)

Frank Harrell

Examples

1
# See test.Rnw in tests directory

harrelfe/hreport documentation built on July 26, 2021, 9:09 a.m.