qe.mean.sd | R Documentation |
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
qe.mean.sd(
min.val,
q1.val,
med.val,
q3.val,
max.val,
n,
qe.fit.control = list()
)
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 |
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
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. |
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.