aePlot {qreport} | R Documentation |
Adverse Event Plot
Description
Generates graphics for binary event proportions
Usage
aePlot(
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,
size = c("regular", "wide"),
popts = NULL,
label = 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 |
data |
input data frame |
subset |
subsetting criteria |
na.action |
function for handling |
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 |
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 |
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 |
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 |
conf.int |
confidence level for difference in proportions (passed to |
etype |
a character string describing the nature of the events, for example |
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 |
size |
default is standard text body width. Set to |
popts |
a list of additional options to pass to |
label |
label for figure. |
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 qreport
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.
For an example with output see https://hbiostat.org/rflow/descript.html#adverse-event-chart/
Value
no return value, called for knitting with knitr
Author(s)
Frank Harrell
Examples
# See test.Rnw in tests directory