qe.study.level {metamedian} | R Documentation |
Study-Level application of quantile estimation method
Description
This function estimates the asymptotic sampling variance of either the (estimated) median or the (estimated) difference of medians for a primary study that reports one of the following summary measures:
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
S4: mean, standard deivation, and sample size.
.
Usage
qe.study.level(
min.g1,
q1.g1,
med.g1,
q3.g1,
max.g1,
n.g1,
mean.g1,
sd.g1,
min.g2,
q1.g2,
med.g2,
q3.g2,
max.g2,
n.g2,
mean.g2,
sd.g2,
single.family = FALSE,
loc.shift = FALSE,
qe.fit.control.g1 = list(),
qe.fit.control.g2 = list()
)
Arguments
min.g1 |
numeric value giving the sample minimum (first group for two-group studies). |
q1.g1 |
numeric value giving the first quartile (first group for two-group studies). |
med.g1 |
numeric value giving the sample median (first group for two-group studies). |
q3.g1 |
numeric value giving the sample third quartile (first group for two-group studies). |
max.g1 |
numeric value giving the sample maximum (first group for two-group studies). |
n.g1 |
numeric value giving the sample size (first group for two-group studies). |
mean.g1 |
numeric value giving the sample mean (first group for two-group studies). |
sd.g1 |
numeric value giving the sample standard deviation (first group for two-group studies). |
min.g2 |
numeric value giving the sample minimum of the second group for two-group studies. |
q1.g2 |
numeric value giving the sample first quartile of the second group for two-group studies. |
med.g2 |
numeric value giving the sample median of the second group for two-group studies. |
q3.g2 |
numeric value giving the sample third quartile of the second group for two-group studies. |
max.g2 |
numeric value giving the sample maximum of the second group for two-group studies. |
n.g2 |
numeric value giving the sample size of the second group for two-group studies. |
mean.g2 |
numeric value giving the sample mean of the second group for two-group studies. |
sd.g2 |
numeric value giving the sample standard deviation of the second group for two-group studies. |
single.family |
logical scalar indicating that for two-group studies, the parametric family of distributions is assumed to be the same across both groups (the default is |
loc.shift |
logical scalar indicating that for two-group studies, distributions are assumed to only differ by a location shift (the default is |
qe.fit.control.g1 |
optional list of control parameters for |
qe.fit.control.g2 |
optional list of control parameters for |
Details
In order to estimate the asymptotic sampling variance of the median (in S1, S2, or S3), one must have an estimate of the probability density function of the outcome evaluated at the population median. The qe.fit
function is applied to estimate the outcome distribution.
For two-group studies studies, one may assume that the outcome in both groups follows the same parametric family of distributions. In this case, distribution selection for the QE method is applied as follows. The qe.fit
function is applied to fit the candidate distributions of each group separately. However, for each candidate distribution, the objective function evaluated at the fitting parameters are summed over the two groups. The parametric family of distributions with the smallest sum is used as the underlying distribution of the both groups. If single.family
is TRUE
, then selected.dist
is a character string indicating the selected parametric family. If single.family
is FALSE
, then selected.dist
is a vector of length 2 where elements 1 and 2 are character strings of the selected parametric families in groups 1 and 2, respectively.
One may also assume for two-group studies that the outcome distributions in the two groups only differ by a location shfit. In this case, a weighted mean (weighted by sample size) of the estimated probability density functions evaluated at the population medians is used to estimate the asymptotic sampling variance of the difference of medians. See McGrath et al. (2020) for further details.
When a study provides S4 summary measures, the outcome distribution is assumed to be normal. The sample median is estimated by the sample mean, and its variance is estimated by the sample variance divided by the sample size. In this case, the single.family
and loc.shift
arguments are not used.
Value
A list with the following components:
var |
Estimated sampling variance of the effect size. |
effect.size |
Effect size of study. |
selected.dist |
Selected outcome distribution(s). See 'Details'. |
study.type |
Character string specifying whether one-group or two-group summary data was provided. |
References
McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.
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))
## Estimate sampling variance of the median
qe.study.level(q1.g1 = quants[1], med.g1 = quants[2], q3.g1 = quants[3],
n.g1 = n)