## S3 method for class 'default':
forest(x, vi, sei, annotate=TRUE, showweight=FALSE,
xlim=NULL, alim=NULL, ylim=NULL, at=NULL, steps=5,
level=95, digits=2, refline=0, xlab=NULL,
slab=NULL, ilab=NULL, ilab.xpos=NULL, ilab.pos=NULL,
subset=NULL, transf=FALSE, atransf=FALSE, targs=NULL,
rows=NULL, efac=1, pch=15, psize=NULL,
cex=NULL, cex.lab=NULL, cex.axis=NULL, \dots)
vi
or sei
, needs to be specified)TRUE
).FALSE
).NULL
, which means that the function tries to set the horizontal plot limits to some sensible values.NULL
, which means that the function tries to set the x axis limits to some sensible values.NULL
, which means that the function tries to set the y axis limits to some sensible values.NULL
, which means that the function tries to set the tick mark positions/labels to some sensible values.at
argument.NA
.NULL
(default), the function tries to set an appropriate axis title.NULL
, which means that simple labels are created within the function. To suppress labels, set this argument to NA
.ilab
.ilab
(2 means right, 4 mean left aligned). The default is to center the labels.transf=exp
). Defaults to FALSE
, which means that no transformattransf=exp
). Defaults to FALSE
, which means that no transformation is used.transf
or atransf
.NULL
, which means that the function sets this value automatically. Can also be a single value specifying the row (horipoints
for other options. Can also be a vector of values.NULL
, which means that the point sizes are drawn proportional to the precision of the estimates.NULL
(default), the function tries to set this to a sensible value.NULL
(default), the function tries to set this to a sensible value.NULL
(default), the function tries to set this to a sensible value.transf
argument, the observed effect sizes and corresponding confidence interval bounds can be transformed with an arbitrary function. For example, if log odds ratios are provided to the function, then one could use transf=exp
to obtain a forest plot showing the odds ratios. Alternatively, one can use the atransf
argument to transform the x axis labels and annotations. The examples below illustrate the use of these arguments.
Summary estimates can also be added to the plot with the addpoly
function. See the documentation for that function for examples.forest
, addpoly
### load BCG vaccine data
data(dat.bcg)
### calculate log relative risks and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg,
data=dat.bcg, append=TRUE)
### forest plot of the observed relative risks
forest(dat$yi, dat$vi, slab=paste(dat$author, dat$year, sep=", "), atransf=exp)
### see also examples for the forest.rma function
Run the code above in your browser using DataLab