knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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:
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.
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")
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 # QE Method res_qe <- qe.mean.sd(min.val = 2, med.val = 4, max.val = 9, n = 100) res_qe # MLN Method res_mln <- mln.mean.sd(min.val = 2, med.val = 4, max.val = 9, n = 100) res_mln
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 # QE Method res_qe_se <- get_SE(res_qe) res_qe_se$est.se # MLN Method res_mln_se <- get_SE(res_mln) res_mln_se$est.se
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.