MyNixOS website logo
Description

Meta Analysis Instrumental Variable Estimator.

Meta-analysis traditionally assigns more weight to studies with lower standard errors, assuming higher precision. However, in observational research, precision must be estimated and is vulnerable to manipulation, such as p-hacking, to achieve statistical significance. This can lead to spurious precision, invalidating inverse-variance weighting and bias-correction methods like funnel plots. Common methods for addressing publication bias, including selection models, often fail or exacerbate the problem. This package introduces an instrumental variable approach to limit bias caused by spurious precision in meta-analysis. Methods are described in 'Irsova et al.' (2025) <doi:10.1038/s41467-025-63261-0>.

MAIVE: Meta-Analysis Instrumental Variable Estimator

CRAN status R-CMD-check Codecov test coverage

Spurious Precision in Meta-Analysis of Observational Research
by Zuzana Irsova, Pedro R. D. Bom, Tomas Havranek, and Heiko Rachinger

Project Website: https://meta-analysis.cz/maive/


Overview

MAIVE addresses a fundamental problem in meta-analysis of observational research: spurious precision.

Traditional meta-analysis assigns more weight to studies with lower standard errors, assuming higher precision. However, in observational research, precision can be manipulated through p-hacking and other questionable research practices, invalidating:

  • Inverse-variance weighting schemes
  • Traditional bias-correction methods (funnel plots, trim-and-fill)
  • Selection models for publication bias

MAIVE implements an instrumental variable approach to limit bias caused by spurious precision in meta-analysis.

Installation

From CRAN (coming soon)

install.packages("MAIVE")

Development version

install.packages("devtools")
devtools::install_github("meta-analysis-es/maive")

Load package

library(MAIVE)

Quick Start

# Prepare your data
data <- data.frame(
  bs = c(...),        # Effect sizes
  sebs = c(...),      # Standard errors
  Ns = c(...),        # Sample sizes
  study_id = c(...)   # Study IDs (optional)
)

# Run MAIVE with defaults (PET-PEESE, instrumented SEs, no weights)
result <- maive(
  dat = data,
  method = 3,      # PET-PEESE (default)
  weight = 0,      # No weights (default)
  instrument = 1,  # Instrument SEs (default)
  studylevel = 2,  # Cluster-robust (default)
  SE = 3,          # Wild bootstrap (default)
  AR = 1           # Anderson-Rubin CI (default)
)

# View results
print(result$Estimate)    # MAIVE estimate
print(result$SE)          # Standard error
print(result$Hausman)     # Hausman test
print(result$`F-test`)    # First-stage F-test

Data Structure

The maive() function expects a data frame with:

ColumnLabelDescription
1bsPrimary estimates (effect sizes)
2sebsStandard errors (must be > 0)
3NsSample sizes (must be > 0)
4study_idStudy identification (optional, for clustering/fixed effects)

Key Features

Methods

  • PET (Precision-Effect Test)
  • PEESE (Precision-Effect Estimate with Standard Error)
  • PET-PEESE (Conditional method, default)
  • EK (Endogenous Kink)

Weighting Schemes

  • No weights (recommended when spurious precision is a concern)
  • Inverse-variance weights
  • MAIVE-adjusted weights (using instrumented SEs)
  • WAIVE (more aggressive correction via waive() function - downweights spurious precision and outliers) - Details

Robust Inference

  • Study-level correlation (fixed effects, clustering, or both)
  • Multiple SE estimators (CR0, CR1, CR2, wild bootstrap)
  • Anderson-Rubin confidence intervals for weak instruments
  • First-stage specification options (levels or log transformation)

Output

The function returns:

  • MAIVE point estimate and standard error
  • Standard (non-IV) estimate for comparison
  • Hausman-type test statistic
  • First-stage F-test of instrument strength
  • Anderson-Rubin confidence interval
  • Publication bias test p-value
  • Instrumented standard errors

Documentation

  • Getting Started Guide: See vignette("introduction")
  • Function Reference: ?maive and ?waive
  • Guided interactive workflow: https://www.easymeta.org
  • Development Workflow: .github/DEVELOPMENT-WORKFLOW.md
  • CRAN Submission: .github/CRAN-SUBMISSION.md
  • Project Page: https://meta-analysis.cz/maive/

Example

# Create example data
set.seed(123)
data <- data.frame(
  bs = rnorm(50, mean = 0.3, sd = 0.2),
  sebs = runif(50, min = 0.05, max = 0.3),
  Ns = sample(100:1000, 50, replace = TRUE),
  study_id = rep(1:10, each = 5)
)

# Run MAIVE
result <- maive(data, method = 3, weight = 0, instrument = 1, 
                studylevel = 2, SE = 3, AR = 1)

# Compare with standard estimate
cat("MAIVE Estimate:", result$Estimate, "\n")
cat("Standard Estimate:", result$StdEstimate, "\n")
cat("Hausman Test:", result$Hausman, "\n")

# Use WAIVE for more aggressive correction (downweights spurious precision + outliers)
result_waive <- waive(data, method = 3, instrument = 1,
                      studylevel = 2, SE = 3, AR = 1)
cat("WAIVE Estimate:", result_waive$Estimate, "\n")

Citation

If you use MAIVE in your research, please cite:

Irsova, Z., Bom, P.R.D., Havranek, T., & Rachinger, H. (2025). Spurious precision in meta-analysis of observational research. Nature Communications, 16, 8454. https://doi.org/10.1038/s41467-025-63261-0

References

Keane, M., & Neal, T. (2023). Instrument strength in IV estimation and inference: A guide to theory and practice. Journal of Econometrics, 235(2), 1625-1653. https://doi.org/10.1016/j.jeconom.2022.12.009

Tipton, E. (2015). Small sample adjustments for robust variance estimation with cluster-correlated data. Psychological Methods, 20(3), 375–389. https://doi.org/10.1037/met0000019

Contributing

We welcome contributions! Please see our GitHub repository for:

  • Bug reports and feature requests (use Issues)
  • Code contributions (submit Pull Requests)
  • Questions and discussions

License

MIT License - see LICENSE file for details.

Authors

  • Zuzana Irsova - Charles University, Prague
  • Pedro R. D. Bom - University of Deusto, Bilbao
  • Tomas Havranek - Charles University, Prague; CEPR, London; METRICS, Stanford
  • Petr Cala (Maintainer) - Charles University, Prague
  • Heiko Rachinger - University of the Balearic Islands, Palma

Questions? Contact the maintainer or visit our project website.

Metadata

Version

0.2.4

License

Unknown

Platforms (78)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows