View source: R/pub_bias_plot.R
pub_bias_plot | R Documentation |
This function adds the bias corrected mean and confidence intervals to an existing orchard plot that displays the overall meta-analytic mean effect size.
pub_bias_plot(
plot,
fe_model,
v_model = NULL,
col = c("red", "blue"),
plotadj = -0.05,
textadj = 0.05,
branch.size = 1.2,
trunk.size = 3
)
plot |
The orchard plot object to add the bias corrected mean and confidence intervals to. This plot needs to be a plot that displays the raw and a single meta-analytic mean (overall mean), confidence interval and predcition interval. |
fe_model |
The meta-analytic model (rma object) produced from a two-step correction (sensu Yang et al. 2023) (Step 1: Fixed effect model) with a robust corretion to correct the meta-analytic mean for publication bias (selection bias) and the dependency in the data. |
v_model |
An optional argument. The meta-analytic model (rma object) to deal with publication bias using the meta-regression approach proposed by Nakagawa et al. 2023. This model can have fixed and/or random effects, with one random effect being sampling error (se or v). The intercept from this model can be considred the corrected meta-analytic mean when sample size is infinite or sampling error is zero. |
col |
The colour of the mean and confidence intervals. |
plotadj |
The adjustment to the x-axis position of the mean and confidence intervals. |
textadj |
The adjustment to the y-axis position of the mean and confidence intervals for the text displaying the type of correction. |
branch.size |
Size of the confidence intervals. |
trunk.size |
Size of the mean, or central point. |
An orchard plot with the corrected meta-analytic mean and confidence intervals added.
Daniel Noble - daniel.noble@anu.edu.au
## Not run:
# Data
data(english)
# We need to calculate the effect sizes, in this case d
english <- escalc(measure = "SMD", n1i = NStartControl, sd1i = SD_C, m1i = MeanC, n2i = NStartExpt, sd2i = SD_E, m2i = MeanE,
var.names=c("SMD","vSMD"),
data = english)
# Our MLMA model
english_MA1 <- rma.mv(yi = SMD, V = vSMD, random = list( ~ 1 | StudyNo, ~ 1 | EffectID),test = "t", data = english)
# Step 1: Fit the fixed effect model
english_MA2 <- rma.mv(yi = SMD, V = vSMD, data = english, test = "t")
english_MA3 <- rma(yi = SMD, vi = vSMD, data = english, test = "t", method = "FE")
# Step 2: Correct for dependency
english_MA2_1 <- robust(english_MA2, cluster = english$StudyNo, clubSandwich=TRUE)
# Step 3: Testing modified eggers. Need intercept
english_MA4 <- rma.mv(yi = SMD, V = vSMD, mod = ~vSMD, random = list( ~ 1 | StudyNo, ~ 1 | EffectID),test = "t", data = english)
# Now plot the results
plot <- orchard_plot(english_MA1, group = "StudyNo", xlab = "Standardized Mean Difference")
plot2 <- pub_bias_plot(plot, english_MA2_1)
plot3 <- pub_bias_plot(plot, english_MA2_1, english_MA4)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.