MyNixOS website logo
Description

Meta-Analytic Effect Size Calculation for Pre-Post Designs with Correlation Imputation.

Tools for the calculation of effect sizes (standardised mean difference) and mean difference in pre-post controlled studies, including robust imputation of missing variances (standard deviation of changes) and correlations (Pearson correlation coefficient). The main function metacor_dual() implements several methods for imputing missing standard deviation of changes or Pearson correlation coefficient, and generates transparent imputation reports. Designed for meta-analyses with incomplete summary statistics. For more details on the methods, see Higgins et al. (2023) and Fu et al. (2013).

metacor

metacor is an R package for advanced meta-analysis of pre-post studies, with or without a control group. It provides flexible effect size calculation, robust imputation strategies for missing SDs or correlations, and reproducible reporting.

Installation

You can install the development version of metacor from GitHub

# Install the remotes package if needed:
# install.packages("remotes")

remotes::install_github("https://github.com/ikerugr/metacor")

Example

Suppose you have a data frame of pre-post means, SDs, and sample sizes. Here’s a minimal example with fake data:

library(metacor)

# Example dataset (add your real studies for actual analysis)
df <- data.frame(
  study_name = c("Study1", "Study2", "Study3", "Study4","Study5", "Study6", "Study7", "Study8", "Study9"),
  p_value_Int = c(1.038814e-07, NA, NA, NA, NA, 2.100000e-02, NA, NA, NA),
  n_Int = c(10, 10, 10, 10, 15, 15, 10, 10, 10),
  meanPre_Int = c(8.17, 10.09, 10.18, 9.85, 9.51,7.70, 10.00,  11.53, 11.20),
  meanPost_Int = c(10.12, 12.50, 12.56,10.41, 10.88, 9.20, 10.80,13.42,12.00),
  sd_pre_Int = c(1.83,0.67,0.66,0.90,0.62, 0.90, 0.70, 0.60, 1.90),
  sd_post_Int = c(1.85, 0.72, 0.97, 0.67, 0.76, 1.10, 0.70,0.80,1.80),
  upperCI_Int = c(NA, NA,NA, NA,NA, NA,NA, NA, NA),
  lowerCI_Int = c(NA, NA,NA, NA,NA, NA,NA, NA, NA))

results <- metacor_dual(df,
                        digits = 3,
                        method = "both",
                        apply_hedges = TRUE,
                        add_to_df = TRUE,
                        SMD_method = "SMDpre",
                        MeanDifferences = TRUE,
                        impute_method = "cv",
                        verbose = TRUE,
                        report_imputations = TRUE,
                        custom_sd_diff_int = NULL,
                        custom_sd_diff_con = NULL,
                        single_group = TRUE)
#> Warning in metacor_dual(df, digits = 3, method = "both", apply_hedges = TRUE, :
#> No real SD diff values available to impute (con).
#> Imputed sd_diff_int at row 2 using 'cv' (0.8494): 2.0470
#> Warning in metacor_dual(df, digits = 3, method = "both", apply_hedges = TRUE, : Row 2: Imputed sd_diff_int = 2.0470 gives r_int = -3.3405 (outside [-0.9999, 0.9999]).
#> → Suggested sd_diff_int range: [0.0510, 1.3900].
#> → r_int not assigned.
#> Imputed sd_diff_int at row 3 using 'cv' (0.8494): 2.0215
#> Warning in metacor_dual(df, digits = 3, method = "both", apply_hedges = TRUE, : Row 3: Imputed sd_diff_int = 2.0215 gives r_int = -2.1166 (outside [-0.9999, 0.9999]).
#> → Suggested sd_diff_int range: [0.3102, 1.6300].
#> → r_int not assigned.
#> Imputed sd_diff_int at row 4 using 'cv' (0.8494): 0.4757
#> Imputed sd_diff_int at row 5 using 'cv' (0.8494): 1.1636
#> Imputed sd_diff_int at row 7 using 'cv' (0.8494): 0.6795
#> Imputed sd_diff_int at row 8 using 'cv' (0.8494): 1.6053
#> Warning in metacor_dual(df, digits = 3, method = "both", apply_hedges = TRUE, : Row 8: Imputed sd_diff_int = 1.6053 gives r_int = -1.6428 (outside [-0.9999, 0.9999]).
#> → Suggested sd_diff_int range: [0.2002, 1.4000].
#> → r_int not assigned.
#> Imputed sd_diff_int at row 9 using 'cv' (0.8494): 0.6795

By default, a detailed Word report (imputation_report.docx) is generated, describing all imputations made. You can adjust arguments for imputation method, effect size, verbosity, and more.

Features

  • Calculates multiple effect size metrics: SMDpre, SMDchange, ScMDpooled, ScMDpre.
  • Handles both single-group and two-group (control vs intervention) meta-analyses.
  • Flexible imputation: mean, direct, coefficient of variation, manual.
  • Generates a transparent, reproducible report for your systematic review or meta-analysis.

More information

vignette(“metacor-intro”)

Author

Iker J. Bautista (2025) Chichester University

This README was generated with readme.Rmd.

Metadata

Version

1.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • 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-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-windows