qe.mean.sd: Quantile estimation method for estimating the sample mean and...

View source: R/qe.mean.sd.R

qe.mean.sdR Documentation

Quantile estimation method for estimating the sample mean and standard deviation

Description

This function applies the quantile estimation (QE) method to estimate the sample mean and standard deviation from a study that presents 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

Usage

qe.mean.sd(
  min.val,
  q1.val,
  med.val,
  q3.val,
  max.val,
  n,
  qe.fit.control = list()
)

Arguments

min.val

numeric value giving the sample minimum.

q1.val

numeric value giving the sample first quartile.

med.val

numeric value giving the sample median.

q3.val

numeric value giving the sample third quartile.

max.val

numeric value giving the sample maximum.

n

numeric value giving the sample size.

qe.fit.control

optional list of control parameters for qe.fit.

Details

In brief, the QE method fits candidate distribution(s) by minimizing the distance between observed and distribution quantiles. See qe.fit for further details concerning the distribution fitting step. If multiple candidate distributions are fit, the distribution with the best fit (i.e., the fitted distribution obtaining the smallest distance between observed and distribution quantiles) is selected as the underlying outcome distribution. The mean and standard devition of the selected distribution are used to estimate the sample mean and standard deviation, respectively

Value

A list with the following components:

est.mean

Estimated sample mean.

est.sd

Estimated sample standard deviation.

selected.dist

Selected outcome distribution.

values

Values of the objective functions evaluated at the estimated paramters of each candidate distribution.

...

Some additional elements.

References

McGrath S., Zhao X., Steele R., Thombs B.D., Benedetti A., and the DEPRESsion Screening Data (DEPRESSD) Collaboration. (2020). Estimating the sample mean and standard deviation from commonly reported quantiles in meta-analysis. Statistical Methods in Medical Research. 29(9):2520-2537.

Examples

## Generate S2 summary data
set.seed(1)
n <- 100
x <- stats::rlnorm(n, 2.5, 1)
quants <- stats::quantile(x, probs = c(0.25, 0.5, 0.75))
obs.mean <- mean(x)
obs.sd <- stats::sd(x)

## Estimate the sample mean and standard deviation using the QE method
qe.mean.sd(q1.val = quants[1], med.val = quants[2], q3.val = quants[3],
    n = n)


estmeansd documentation built on May 29, 2024, 7:11 a.m.