View source: R/orchard_leave1out.R
orchard_leave1out | R Documentation |
Plots the output of a leave-one-out analysis for a meta-analytic model. The plot displays the effect sizes, overall effect estimate (with confidence and prediction intervals), and optionally, the effect sizes left out ("ghost points") in each iteration. In addition, the original model's 95% confidence limits are shown as reference lines.
orchard_leave1out(
leave1out,
ylab = NULL,
ci_lines = TRUE,
ci_lines_color = "red",
ghost_points = TRUE,
angle = 0,
g = FALSE,
transfm = c("none", "tanh", "invlogit", "percent", "percentr"),
...
)
leave1out |
Output from |
ylab |
Optional label for the y-axis, which lists the elements left out. |
ci_lines |
Logical indicating whether to add horizontal reference lines (default is |
ci_lines_color |
Character string specifying the color for the confidence interval lines (default is |
ghost_points |
Logical indicating whether to add "ghost points" for the effect sizes that were left out.
These are plotted as empty points (default is |
angle |
Numeric value specifying the angle of the x-axis labels in degrees (default is 0). |
g |
Logical indicating whether to return the plot as a grob object (default is |
transfm |
Character string specifying the transformation to apply to the data. Options are: "none" (default, no transformation), "tanh" (hyperbolic tangent), "invlogit" (inverse logit), "percent" (percentage), or "percentr" (percentage range). |
... |
Additional arguments passed to |
This function is useful to see how sensitive is the overall effect size estimated by a meta-analytic model to exclusion of each element from a group.
The y-axis shows the elements from the group. For each one, the plot shows the result from the model that left-out that element. For each model, the plot shows the effect sizes, overall effect estimate with confidence and prediction intervals, and "ghost points". This "ghost points" are the effect sizes left out and they are shown as empty points. They can be ommited setting 'ghost_points' to FALSE.
The plot also shows 95 as red dotted lines. The arguments 'ci_lines' and 'ci_lines_color' allow to remove this lines or select their color.
The function internally sets a color palette for the plot. If more than 20 elements are in the group
, a viridis
palette is used. Otherwise, a color-blind friendly palette is applied by default.
A ggplot2 object displaying the leave-one-out analysis with reference lines for the original model's confidence limits.
Facundo Decunta - fdecunta@agro.uba.ar
## Not run:
# Fit a multivariate meta-analytic model using the metafor package
res <- metafor::rma.mv(lnrr, lnrr_vi, random = ~ 1 | paper_ID, data = fish)
loo_res <- orchaRd::leave_one_out(res, group = "paper_ID")
orchard_leave1out(leave1out = loo_res, xlab = "lnRR")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.