phacking: Sensitivity Analysis for p-Hacking in Meta-Analyses

Fits right-truncated meta-analysis (RTMA), a bias correction for the joint effects of p-hacking (i.e., manipulation of results within studies to obtain significant, positive estimates) and traditional publication bias (i.e., the selective publication of studies with significant, positive results) in meta-analyses [see Mathur MB (2022). "Sensitivity analysis for p-hacking in meta-analyses." <doi:10.31219/>.]. Unlike publication bias alone, p-hacking that favors significant, positive results (termed "affirmative") can distort the distribution of affirmative results. To bias-correct results from affirmative studies would require strong assumptions on the exact nature of p-hacking. In contrast, joint p-hacking and publication bias do not distort the distribution of published nonaffirmative results when there is stringent p-hacking (e.g., investigators who hack always eventually obtain an affirmative result) or when there is stringent publication bias (e.g., nonaffirmative results from hacked studies are never published). This means that any published nonaffirmative results are from unhacked studies. Under these assumptions, RTMA involves analyzing only the published nonaffirmative results to essentially impute the full underlying distribution of all results prior to selection due to p-hacking and/or publication bias. The package also provides diagnostic plots described in Mathur (2022).

Version: 0.2.1
Depends: R (≥ 4.1.0)
Imports: dplyr, ggplot2, metabias, metafor, methods, purrr, rlang, stats, stats4, truncnorm, Rcpp (≥ 0.12.0), RcppParallel (≥ 5.0.1), Rdpack, rstan (≥ 2.18.1), rstantools (≥ 2.2.0)
LinkingTo: BH (≥ 1.66.0), Rcpp (≥ 0.12.0), RcppEigen (≥, RcppParallel (≥ 5.0.1), rstan (≥ 2.18.1), StanHeaders (≥ 2.18.0)
Suggests: testthat (≥ 3.0.0)
Published: 2023-07-17
DOI: 10.32614/CRAN.package.phacking
Author: Peter Solymos ORCID iD [cre, ctb], Maya Mathur [aut], Mika Braginsky [aut]
Maintainer: Peter Solymos <peter at>
License: MIT + file LICENSE
NeedsCompilation: yes
SystemRequirements: GNU make
Materials: README NEWS
In views: MetaAnalysis
CRAN checks: phacking results


Reference manual: phacking.pdf


Package source: phacking_0.2.1.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): phacking_0.2.1.tgz, r-oldrel (arm64): phacking_0.2.1.tgz, r-release (x86_64): phacking_0.2.1.tgz, r-oldrel (x86_64): phacking_0.2.1.tgz
Old sources: phacking archive

Reverse dependencies:

Reverse suggests: multibiasmeta


Please use the canonical form to link to this page.