Last chance! 50% off unlimited learning
Sale ends in
sortbyRelativeRisk=FALSE
, the AEs retain
the order specified by the levels of the factor.
The third panel displays the numerical values of number of patients for
each treatment,
number of adverse events for each treatment, and relative risk.
The third panel can be suppressed by the print
method.AEdotplot(xr, ...) ## S3 method for class 'formula':
AEdotplot(xr, groups=NULL, data=NULL,
sortbyRelativeRisk=TRUE,
...,
sub=list(deparse(this.call, width.cutoff=500), cex=.7))
AE ~ nAE/nTRT | OrgSys
, where the condition variable is
optional.
For the formula method only, the variable names are not restricted.
See
data.frame
containing at least four variables:
containing the AE name, the treatment level, the number of observed
AE in that treatment level, the number of
patients in that treatment group. It may also contain a fifth variable
TRUE
, then make the
Adverse Events an ordered factor ordering by relative risk.
If FALSE
, then make the
Adverse Events an ordered factor retaining the order of the input levels.AEdotplot.data.frame
.The function returns
an AEdotplot
object which is a list of three trellis
objects,
one for the the Percent plot, one for the Relative Risk plot, and one
for
the Text plot containing the table of input values. The object has
attributes
main
andsub
hold the main and subtitles. Each must
be a list containing the text in the first component.ae.key
is a key as described inxyplot
.n.events
is a vector containing the number of events in
each subpanel.panel.widths
is a vector of relative widths of the three components
of
the graph. The numbers must sum to one. Zero values are permitted.
The first width includes the left axis and the Percent plot. The second
is the Relative Risk plot, and the third is the plot of the table
values.AEtable
is a table containing the data plotted on its row.The second panel shows relative risk of an event on the Treatment B arm (usually the active compound) relative to the Treatment A arm (usually the placebo), with 95% confidence intervals for a $2\times2$ table. Confidence intervals on the log relative risk are calculated using the asymptotic standard error formula given as Equation 3.18 in Agresti A., Categorical Data Analysis. Wiley: New York, 1990.
By default the AEdotplot
function sorts the events by relative risk.
To retain the sort order implied by the levels
of the AE
factor, specify the argument sortbyRelativeRisk=FALSE
.
To control the sort order, make the AE factor in the input dataset
an ordered
factor
and specify the levels in the order you want.
The third panel shows the numerical values of the number and percent
of observed events on each arm and the relative risk.
The display of third panel can be suppressed by specifying the
panel.widths
argument. See the discussion of the
panel.widths
in AEdotplot.data.frame
.
AEdotplot.data.frame
## formula method. See ?AEdotplot.data.frame for other methods.
data(AEdata)
head(AEdata)
AEdotplot(AE ~ nAE/nTRT, groups = TRT, data = AEdata)
AEdotplot(AE ~ nAE/nTRT | OrgSys, groups = TRT, data = AEdata)AEdotplot(AE ~ nAE/nTRT | OrgSys, groups = TRT, data = AEdata[c(AEdata$OrgSys %in% c("GI","Resp")),])
## test sortbyRelativeRisk=FALSE
ABCD.12345 <- AEdata[1:12,]
head(ABCD.12345)
AEdotplot(AE ~ nAE/nTRT | OrgSys, groups=TRT, data=ABCD.12345)
AEdotplot(AE ~ nAE/nTRT | OrgSys, groups=TRT, data=ABCD.12345, sort=FALSE)
## suppress third panel
tmp <- AEdotplot(AE ~ nAE/nTRT, groups = TRT, data = AEdata)
print(tmp, AEtable=FALSE)
Run the code above in your browser using DataLab