forest | R Documentation |
Produce a forest plot. Includes graphical summary of results if applied to output of suitable model-fitting function. forest
methods for madad
and madauni
objects are provided.
## S3 method for class 'madad' forest(x, type = "sens", log = FALSE, ...) ## S3 method for class 'madauni' forest(x, log = TRUE, ...) forestmada(x, ci, plotci = TRUE, main = "Forest plot", xlab = NULL, digits = 2L, snames = NULL, subset = NULL, pch = 15, cex = 1, cipoly = NULL, polycol = NA, ...)
x |
an object for which a |
ci |
numeric matrix, each row corresponds to a confidence interval (the first column being the lower bound and the second the upper). |
plotci |
logical, should the effects sizes and their confidence intervals be added to the plot (as text)? |
main |
character, heading of plot. |
xlab |
label of x-axis. |
digits |
integer, number of digits for axis labels and confidence intervals. |
snames |
character vector, study names. If |
subset |
integer vector, allows to study only a subset of studies in the plot. One can also reorder the studies with the help of this argument. |
pch |
integer, plotting symbol, defaults to a small square. Also see |
cex |
numeric, scaling parameter for study names and confidence intervals. |
cipoly |
logical vector, which confidence interval should be plotted as a polygon? Useful for summary estimates. If set to |
polycol |
color of the polygon(s), passed on to |
type |
character, one of |
log |
logical, should the log-transformed values be plotted? |
... |
arguments to be passed on to |
Produces a forest plot to graphically assess heterogeneity. Note that forestmada
is called internally, so that the ...
argument can be used to pass on arguments to this function; see the examples.
Returns and invisible NULL
.
Philipp Doebler <philipp.doebler@googlemail.com>
madad
, madauni
data(AuditC) ## Forest plot of log DOR with random effects summary estimate forest(madauni(AuditC)) ## Forest plot of negative likelihood ratio (no log transformation) ## color of the polygon: light grey ## draw the individual estimate as filled circles forest(madauni(AuditC, type = "negLR"), log = FALSE, polycol = "lightgrey", pch = 19) ## Paired forest plot of sensitivities and specificities ## Might look ugly if device region is too small old.par <- par() AuditC.d <- madad(AuditC) plot.new() par(fig = c(0, 0.5, 0, 1), new = TRUE) forest(AuditC.d, type = "sens", xlab = "Sensitivity") par(fig = c(0.5, 1, 0, 1), new = TRUE) forest(AuditC.d, type = "spec", xlab = "Specificity") par(old.par) ## Including study names ## Using Letters as dummies forest(AuditC.d, type = "spec", xlab = "Specificity", snames = LETTERS[1:14])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.