MyNixOS website logo
Description

Estimating the Sample Mean and Standard Deviation from Commonly Reported Quantiles in Meta-Analysis.

Implements the methods of McGrath et al. (2020) <doi:10.1177/0962280219889080> and Cai et al. (2021) <doi:10.1177/09622802211047348> for estimating the sample mean and standard deviation from commonly reported quantiles in meta-analysis. These methods can be applied to studies that report the sample median, sample size, and one or both of (i) the sample minimum and maximum values and (ii) the first and third quartiles. The corresponding standard error estimators described by McGrath et al. (2023) <doi:10.1177/09622802221139233> are also included.

estmeansd: Estimating the Sample Mean and Standard Deviation from Commonly Reported Quantiles in Meta-Analysis

CRAN_Status_Badge CRAN_Download_Badge CRAN_Download_Badge_All

The estmeansd package implements the methods of McGrath et al. (2020) and Cai et al. (2021) for estimating the sample mean and standard deviation from commonly reported quantiles in meta-analysis. Specifically, these methods can be applied to studies that report one of the following sets of summary statistics:

  • S1: median, minimum and maximum values, and sample size
  • S2: median, first and third quartiles, and sample size
  • S3: median, minimum and maximum values, first and third quartiles, and sample size

This package also implements the methods described by McGrath et al. (2023) to estimate the standard error of these mean and standard deviation estimators. The estimated standard errors are needed for computing the weights in conventional inverse-variance weighted meta-analysis approaches.

Additionally, the Shiny app estmeansd implements these methods.

Note that the R package metamedian can apply these methods (as well as several others) to perform a meta-analysis. See McGrath et al. (in press) for a guide on using the metamedian package.

Installation

You can install the released version of estmeansd from CRAN with:

install.packages("estmeansd")

After installing the devtools package (i.e., calling install.packages(devtools)), the development version of estmeansd can be installed from GitHub with:

devtools::install_github("stmcg/estmeansd")

Usage

Specifically, this package implements the Box-Cox (BC), Quantile Estimation (QE), and Method for Unknown Non-Normal Distributions (MLN) approaches to estimate the sample mean and standard deviation. The BC, QE, and MLN methods can be applied using the bc.mean.sd()qe.mean.sd(), and mln.mean.sd() functions, respectively:

library(estmeansd)
set.seed(1)

# BC Method
res_bc <- bc.mean.sd(min.val = 2, med.val = 4, max.val = 9, n = 100)
res_bc 
#> $est.mean
#> [1] 4.210971
#> 
#> $est.sd
#> [1] 1.337348

# QE Method
res_qe <- qe.mean.sd(min.val = 2, med.val = 4, max.val = 9, n = 100)
res_qe
#> $est.mean
#> [1] 4.347284
#> 
#> $est.sd
#> [1] 1.502171

# MLN Method
res_mln <- mln.mean.sd(min.val = 2, med.val = 4, max.val = 9, n = 100) 
res_mln
#> $est.mean
#> [1] 4.195238
#> 
#> $est.sd
#> [1] 1.294908

To estimate the standard error of these mean estimators, we can apply the get_SE() function as follows:

# BC Method
res_bc_se <- get_SE(res_bc)
res_bc_se$est.se
#> [1] 0.1649077

# QE Method
res_qe_se <- get_SE(res_qe)
res_qe_se$est.se
#> [1] 0.2391081

# MLN Method
res_mln_se <- get_SE(res_mln)
res_mln_se$est.se
#> [1] 0.1505351
Metadata

Version

1.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • 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