Standard approaches to meta-analysis assumes that effect sizes are statistically independent. Here we provide methods for fixed and random effects meta-analysis when the correlation between effect sizes are known.

Fixed effects meta-analysis

LS() implements fixed effect meta-analysis for correlated test statistics using method of Lin and Sullivan (2009). By default, correlation is set to identity matrix to for independent test statistics.

Random effects meta-analysis

RE2C() implements random effect meta-analysis for correlated test statistics that jointly tests deviation of the mean from zero as well as effect size heterogenity. This method uses the RE2 method of Han and Eskin (2011), or RE2 for correlated test statistics from Han et al. (2016). By default, correlation is set to identity matrix to for independent test statistics. (In addition, this function computes the two step RE2C method of Lee, Eskin, and Han (2017) to further test for heterogenity in effect size after applying a fixed effect test.)

Examples

library(remaCor)
library(metafor)

# Generate effects
library(mvtnorm)
library(clusterGeneration )

n = 4
Sigma = cov2cor(genPositiveDefMat(n)$Sigma)
beta = t(rmvnorm(1, rep(0, n), Sigma))
stders = rep(.1, n)

# Standard fixed effects meta-analysis
# of independent effects with metafor pacakge
rma( beta, sei=stders, method="FE")
## 
## Fixed-Effects Model (k = 4)
## 
## I^2 (total heterogeneity / total variability):   99.10%
## H^2 (total variability / sampling variability):  111.30
## 
## Test for Heterogeneity:
## Q(df = 3) = 333.9128, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval   ci.lb   ci.ub     
##   0.1469  0.0500  2.9390  0.0033  0.0489  0.2449  ** 
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Standard random effects meta-analysis
# of independent effects with metafor pacakge
rma( beta, sei=stders, method="REML")
## 
## Random-Effects Model (k = 4; tau^2 estimator: REML)
## 
## tau^2 (estimated amount of total heterogeneity): 1.1030 (SE = 0.9088)
## tau (square root of estimated tau^2 value):      1.0503
## I^2 (total heterogeneity / total variability):   99.10%
## H^2 (total variability / sampling variability):  111.30
## 
## Test for Heterogeneity:
## Q(df = 3) = 333.9128, p-val < .0001
## 
## Model Results:
## 
## estimate      se    zval    pval    ci.lb   ci.ub    
##   0.1469  0.5275  0.2786  0.7806  -0.8869  1.1808    
## 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Run fixed effects meta-analysis, assume identity correlation  
# Use Lin-Sullivan method
LS( beta, stders)
##       beta   se           p
## 1 0.146948 0.05 0.003293166
# Run fixed effects meta-analysis, accounting for correlation  
# Use Lin-Sullivan method
LS( beta, stders, Sigma)
##       beta         se          p
## 1 0.124812 0.05071817 0.01385915
# Run random effects meta-analysis, assume identity correlation  
RE2C( beta, stders)
##     stat1    stat2        RE2Cp RE2Cp.twoStep       QE          QEp      Isq
## 1 8.63748 312.2144 6.251264e-71            NA 333.9128 4.537466e-72 99.10156
# Run random effects meta-analysis, accounting for correlation 
RE2C( beta, stders, Sigma)
##      stat1   stat2       RE2Cp RE2Cp.twoStep QE QEp Isq
## 1 6.055997 306.061 4.99189e-69            NA NA  NA  NA
##      stat1   stat2       RE2Cp RE2Cp.twoStep QE QEp Isq
## 1 6.055997 306.061 4.99189e-69            NA NA  NA  NA

Session info

sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-apple-darwin19.6.0 (64-bit)
## Running under: macOS Catalina 10.15.7
## 
## Matrix products: default
## BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
## LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
## 
## locale:
## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] grid      stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] mvtnorm_1.1-3           metafor_3.8-1           metadat_1.2-0          
##  [4] Matrix_1.4-1            remaCor_0.0.9           reshape2_1.4.4         
##  [7] ggplot2_3.3.6           clusterGeneration_1.3.7 MASS_7.3-58.1          
## [10] RUnit_0.4.32           
## 
## loaded via a namespace (and not attached):
##  [1] tidyselect_1.1.2 xfun_0.32        bslib_0.4.0      purrr_0.3.4     
##  [5] lattice_0.20-45  colorspace_2.0-3 vctrs_0.4.1      generics_0.1.3  
##  [9] htmltools_0.5.3  yaml_2.3.5       utf8_1.2.2       rlang_1.0.5     
## [13] jquerylib_0.1.4  pillar_1.8.1     glue_1.6.2       withr_2.5.0     
## [17] DBI_1.1.3        lifecycle_1.0.1  plyr_1.8.7       stringr_1.4.1   
## [21] munsell_0.5.0    gtable_0.3.1     codetools_0.2-18 evaluate_0.16   
## [25] knitr_1.40       fastmap_1.1.0    fansi_1.0.3      Rcpp_1.0.9      
## [29] scales_1.2.1     cachem_1.0.6     jsonlite_1.8.0   digest_0.6.29   
## [33] stringi_1.7.8    dplyr_1.0.9      mathjaxr_1.6-0   rbibutils_2.2.9 
## [37] Rdpack_2.4       cli_3.3.0        tools_4.2.0      magrittr_2.0.3  
## [41] sass_0.4.2       tibble_3.1.8     pkgconfig_2.0.3  assertthat_0.2.1
## [45] rmarkdown_2.16   R6_2.5.1         nlme_3.1-159     compiler_4.2.0

References

Han, Buhm, Dat Duong, Jae Hoon Sul, Paul IW de Bakker, Eleazar Eskin, and Soumya Raychaudhuri. 2016. “A General Framework for Meta-Analyzing Dependent Studies with Overlapping Subjects in Association Mapping.” Human Molecular Genetics 25 (9): 1857–66. https://doi.org/10.1093/hmg/ddw049.
Han, Buhm, and Eleazar Eskin. 2011. “Random-Effects Model Aimed at Discovering Associations in Meta-Analysis of Genome-Wide Association Studies.” The American Journal of Human Genetics 88 (5): 586–98. https://doi.org/10.1016/j.ajhg.2011.04.014.
Lee, CH, Eleazar Eskin, and Buhm Han. 2017. “Increasing the Power of Meta-Analysis of Genome-Wide Association Studies to Detect Heterogeneous Effects.” Bioinformatics 33 (14): i379–88. https://doi.org/10.1093/bioinformatics/btx242.
Lin, Dan-Yu, and Patrick F Sullivan. 2009. “Meta-Analysis of Genome-Wide Association Studies with Overlapping Subjects.” The American Journal of Human Genetics 85 (6): 862–72. https://doi.org/10.1016/j.ajhg.2009.11.001.