Learn R Programming

orchaRd (version 2.2.1)

pub_bias_plot: pub_bias_plot

Description

This function adds the bias corrected mean and confidence intervals to an existing orchard plot that displays the overall meta-analytic mean effect size.

Usage

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
)

Value

An orchard plot with the corrected meta-analytic mean and confidence intervals added.

Arguments

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 prediction 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 considered 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.

Author

Daniel Noble - daniel.noble@anu.edu.au

Examples

Run this code
# \donttest{
library(metafor)
# 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)

# Step 3: Testing modified eggers
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)
# }

Run the code above in your browser using DataLab