Skip to contents

PublicationBias is an R package that provides bias correction and sensitivity analysis for publication bias in meta-analyses (per Mathur & VanderWeele, 2020).


You can install PublicationBias from CRAN with:


You can install the development version of PublicationBias from GitHub with:

# install.packages("devtools")


Start by generating some example data from the metafor package.

dat <- metafor::escalc(measure = "RR", ai = tpos, bi = tneg, ci = cpos,
                       di = cneg, data =

Calculate the meta-analytic effect size estimate, correcting for an assumed selection ratio of 5 (i.e., affirmative results are 5x more likely to be published than nonaffirmative ones).

pubbias_meta(yi = dat$yi, vi = dat$vi, selection_ratio = 5,
             model_type = "fixed", favor_positive = FALSE)

Calculate how high the selection ratio would need to be to attenuate the effect size estimate to the null.

pubbias_svalue(yi = dat$yi, vi = dat$vi, q = 0,
               model_type = "fixed", favor_positive = FALSE)