| forest.cdmeta | R Documentation |
Draws a forest plot from an object of class "cdmeta". The plot shows
study-specific effect estimates and confidence intervals, the
confidence-distribution-based summary estimate for the overall mean effect,
and optionally the prediction interval for the effect in a future study.
## S3 method for class 'cdmeta'
forest(
x,
slab = NULL,
order = c("none", "increasing", "decreasing", "precision", "weight"),
level = NULL,
summary_stat = c("mean", "median"),
refline = 0,
xlab = "Effect size",
main = NULL,
atransf = NULL,
at = NULL,
alim = NULL,
xlim = NULL,
digits = 2,
ci_digits = digits,
weight_digits = 1,
show_weights = TRUE,
show_pi = TRUE,
show_het = TRUE,
header = TRUE,
annotate = TRUE,
cex = 0.85,
psize = NULL,
pch = 22,
box_col = "black",
box_bg = "white",
ci_col = "black",
summary_col = "black",
summary_bg = "gray20",
pi_col = "gray40",
refline_col = "gray70",
grid = TRUE,
grid_col = "gray90",
qtype = 8,
symmetric_shapes = TRUE,
mark_summary_estimate = FALSE,
mark_prediction_estimate = FALSE,
estimate_mark_col = "black",
estimate_mark_lwd = 1,
mar = c(4.5, 1, 3, 1),
...
)
forest(x, ...)
x |
An object of class |
slab |
An optional character vector of study labels. If |
order |
A character string specifying the order of studies in the plot.
Available options are |
level |
Confidence level used for study-specific and summary intervals.
If |
summary_stat |
Whether Monte Carlo means ( |
refline |
Numeric location of the reference line. |
xlab |
Label for the x-axis. |
main |
Optional main title. |
atransf |
Optional function used to transform axis labels and printed estimates while plotting coordinates remain on the original analysis scale. |
at |
Optional numeric vector specifying tick-mark locations on the original analysis scale. |
alim |
Optional numeric vector of length 2 specifying plotting limits for the effect-size axis on the original analysis scale. |
xlim |
Optional numeric vector of length 2 specifying full plotting limits including the text columns. |
digits |
Number of digits used for axis labels. |
ci_digits |
Number of digits used for effect estimates and intervals. |
weight_digits |
Number of digits used for study weights. |
show_weights |
Logical indicating whether study weights are shown. |
show_pi |
Logical indicating whether the prediction interval is shown. |
show_het |
Logical indicating whether heterogeneity statistics are shown. |
header |
Logical indicating whether column headers are shown. |
annotate |
Logical indicating whether estimates and intervals are printed on the right side of the plot. |
cex |
Character expansion factor. |
psize |
Optional point sizes for study-specific estimates. If
|
pch |
Plotting symbol for study-specific estimates. |
box_col |
Border color of study-specific points. |
box_bg |
Fill color of study-specific points. |
ci_col |
Color of study-specific confidence intervals. |
summary_col |
Border color of the summary diamond. |
summary_bg |
Fill color of the summary diamond. |
pi_col |
Color of the prediction interval. |
refline_col |
Color of the reference line. |
grid |
Logical indicating whether vertical grid lines are drawn. |
grid_col |
Color of the grid lines. |
qtype |
Quantile type used in |
symmetric_shapes |
Logical indicating whether the summary diamond and prediction-interval marker are drawn symmetrically around interval midpoints. |
mark_summary_estimate |
Logical indicating whether the actual summary point estimate is marked inside the summary diamond. |
mark_prediction_estimate |
Logical indicating whether the actual predictive point estimate is marked on the prediction-interval row. |
estimate_mark_col |
Color of the actual-estimate marks. |
estimate_mark_lwd |
Line width of the actual-estimate marks. |
mar |
Plot margins passed to |
... |
Additional arguments passed to |
Study-specific confidence intervals are calculated using the normal approximation
y_i \pm z_{1-\alpha/2} se_i,
where \alpha = 1 - level. The summary interval for \mu and the
prediction interval are calculated from the Monte Carlo samples in the
cdmeta object when available.
If the object was created with transf = exp, forest() uses
this transformation automatically when atransf = NULL. Tick marks
supplied through at remain on the original analysis scale.
Invisibly returns a data frame containing the plotted study-specific estimates, standard errors, confidence intervals, and weights. Attributes contain the overall, prediction, and heterogeneity summaries on the original analysis scale.
cdmeta
data(hf_iron)
fit_hf <- cdmeta(
y = hf_iron$yi,
se = hf_iron$sei,
B = 10000,
seed = 11111,
transf = exp,
transf_name = "exp"
)
forest(
fit_hf,
slab = hf_iron$study,
at = log(c(0.25, 0.5, 1, 2, 4)),
xlab = "Risk ratio",
mark_summary_estimate = TRUE,
mark_prediction_estimate = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.