Creates a detailed forest plot for subgroup meta-analysis, including study-level effect sizes, subgroup pooled effects, heterogeneity statistics, overall pooled effect, and prediction intervals.
forest_cont_subgroup(
dat,
m_t_col = "mean_t",
sd_t_col = "sd_t",
n_t_col = "n_t",
m_c_col = "mean_c",
sd_c_col = "sd_c",
n_c_col = "n_c",
subgroup_col = "subgroup",
study_col = "Study",
measure = "SMD",
method = "REML",
xlab = NULL,
xlim = NULL,
model = "RE",
title = "Subgroup Forest Plot",
diamond.col = "red",
overall.col = "darkgreen",
study.col = "blue",
CI.col = "blue",
Pred.Inter.col = "black",
square.size = 5,
Pred.Int.size = 1.5,
text_size = 3.5,
pred = TRUE,
xpos = list(Study = NULL, MeanT = NULL, MeanC = NULL, Effect = NULL, Weight = NULL,
PredInt = NULL, Hetero = NULL)
)A ggplot object representing the subgroup forest plot.
A data frame containing the study-level data. Use dat1 included in the package for examples.
Name of the column for treatment group means.
Name of the column for treatment group standard deviations.
Name of the column for treatment group sample sizes.
Name of the column for control group means.
Name of the column for control group standard deviations.
Name of the column for control group sample sizes.
Name of the column indicating subgroup membership.
Name of the column with study labels.
Effect size measure: "SMD" (standardized mean difference) or "MD" (mean difference).
Method for meta-analysis: "REML" (default) or "FE".
Label for the x-axis.
Limits for the x-axis as a numeric vector of length 2.
Random-effects ("RE") or fixed-effects ("FE") model for pooled estimates.
Plot title.
Color for subgroup pooled effect diamonds.
Color for the overall pooled effect diamond.
Color for study-level points.
Color for confidence intervals of individual studies.
Color for the overall prediction interval.
Maximum size of study-level effect squares.
Line thickness for prediction interval.
Base text size for annotations.
Logical; if TRUE, display overall prediction interval.
numeric vector of x-axis positions for annotations
# Using the built-in dataset dat1
forest_cont_subgroup(dat1)
Run the code above in your browser using DataLab