Title: | Meta-Analysis of Medians |
---|---|
Description: | Implements several methods to meta-analyze studies that report the sample median of the outcome. When the primary studies are one-group studies, the methods of McGrath et al. (2019) <doi:10.1002/sim.8013> and Ozturk and Balakrishnan (2020) <doi:10.1002/sim.8738> can be applied to estimate the pooled median. In the two-group context, the methods of McGrath et al. (2020a) <doi:10.1002/bimj.201900036> can be applied to estimate the pooled difference of medians across groups. Additionally, a number of methods (e.g., McGrath et al. (2020b) <doi:10.1177/0962280219889080>, Cai et al. (2021) <doi:10.1177/09622802211047348>, and McGrath et al. (2023) <doi:10.1177/09622802221139233>) are implemented to estimate study-specific (difference of) means and their standard errors in order to estimate the pooled (difference of) means. See McGrath et al. (2024) <doi:10.1002/jrsm.1686> for a detailed guide on using the package. |
Authors: | Sean McGrath [aut, cre] |
Maintainer: | Sean McGrath <[email protected]> |
License: | GPL (>=3) |
Version: | 1.1.2 |
Built: | 2025-02-11 05:28:14 UTC |
Source: | https://github.com/stmcg/metamedian |
The function applies the confidence distribution (CD) approach of Ozturk and Balakrishnan (2020) to meta-analyze one-group studies where each study reports one of the following summary measures:
C1 (and C2): lower and upper bounds of a confidence interval around the median, and coverage probability
C3: median, variance estimate of the median, and sample size
C4: mean, standard deviation, and sample size.
C5: median, first and third quartiles, and sample size
The function estimates the pooled median.
cd( q1, med, q3, n, mean, sd, med.var, med.ci.lb, med.ci.ub, alpha.1, alpha.2, pooled.median.ci.level = 0.95, method = "RE", pool_studies = FALSE )
cd( q1, med, q3, n, mean, sd, med.var, med.ci.lb, med.ci.ub, alpha.1, alpha.2, pooled.median.ci.level = 0.95, method = "RE", pool_studies = FALSE )
q1 |
vector of study-specific sample first quartile values. See 'Details'. |
med |
vector of study-specific sample median values. See 'Details'. |
q3 |
vector of study-specific sample third quartile values. See 'Details'. |
n |
vector of study-specific sample sizes. See 'Details'. |
mean |
vector of study-specific sample mean values. See 'Details'. |
sd |
vector of study-specific sample standard deviation values. See 'Details'. |
med.var |
vector of study-specific estimates of the variance of the median. See 'Details'. |
med.ci.lb |
vector of study-specific lower confidence interval bounds around the medians |
med.ci.ub |
vector of study-specific upper confidence interval bounds around the medians |
alpha.1 |
vector of the study-specific |
alpha.2 |
vector of the study-specific |
pooled.median.ci.level |
optional numeric scalar indicating the desired coverage probability for the pooled median estimate. The default is |
method |
character string specifying whether a fixed effect or random effects model is used. The options are |
pool_studies |
logical scalar specifying whether to meta-analyze the studies. If this argument is set to |
Letting denote the number of studies, provide study-specific summary data as vectors of length
. If a study does not report a given summary measure (e.g., the minimum value), give a value of
NA
for the position in the relevant vector. If no studies report a given summary measure, a vector of only NA
values need not be provided. See 'Examples' for appropriate use.
A list with components
pooled.est |
Pooled estimate of the median |
pooled.est.var |
Estimated variance of the pooled median estimator |
pooled.est.ci.lb |
Lower bound of confidence interval for the pooled median |
pooled.est.ci.ub |
Upper bound of confidence interval for the pooled median |
tausq.est |
Estimate of between-study variance (applicable only when |
yi |
Study-specific point estimates |
vi |
Study-specific sampling variances |
Ozturk, O. and Balakrishnan N. (2020). Meta‐analysis of quantile intervals from different studies with an application to a pulmonary tuberculosis data. Statistics in Medicine, 39, 4519-4537.
## Example 1: med.vals <- c(6.1, 5.2, 3.1, 2.8, 4.5) q1.vals <- c(2.0, 1.6, 2.6, 0.9, 3.2) q3.vals <- c(10.2, 13.0, 8.3, 8.2, 9.9) n.vals <- c(100, 92, 221, 81, 42) ## Meta-analyze studies via CD method cd(q1 = q1.vals, med = med.vals, q3 = q3.vals, n = n.vals)
## Example 1: med.vals <- c(6.1, 5.2, 3.1, 2.8, 4.5) q1.vals <- c(2.0, 1.6, 2.6, 0.9, 3.2) q3.vals <- c(10.2, 13.0, 8.3, 8.2, 9.9) n.vals <- c(100, 92, 221, 81, 42) ## Meta-analyze studies via CD method cd(q1 = q1.vals, med = med.vals, q3 = q3.vals, n = n.vals)
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing the age of COVID-19 infected patients who died and those who survived. The unit of measurement for the age values is years. The rows in the data set correspond to the primary studies. Compared to the "raw" version (i.e., dat.age_raw
), this data set excludes the primary study of Qi et al. (2021) due to its small sample size in the nonsurvivor group.
dat.age
dat.age
A data frame with 51 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of age (nonsurvivor group). |
med.g1 |
median age (nonsurvivor group). |
q3.g1 |
third quartile of age (nonsurvivor group). |
mean.g1 |
mean age (nonsurvivor group). |
sd.g1 |
standard deviation of age (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of age (survivor group). |
med.g2 |
median age (survivor group). |
q3.g2 |
third quartile of age (survivor group). |
mean.g2 |
mean age (survivor group). |
sd.g2 |
standard deviation of age (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
Qi X., Liu Y., Wang J., Fallowfield J.A., Wang J., Li X., Shi J., Pan H., Zou S., Zhang H., and others. (2021). Clinical course and risk factors for mortality of COVID-19 patients with pre-existing cirrhosis: A multicentre cohort study, Gut, 70, 433–436.
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing the age of COVID-19 infected patients who died and those who survived. The unit of measurement for the age values is years. The rows in the data set correspond to the primary studies.
dat.age_raw
dat.age_raw
A data frame with 52 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of age (nonsurvivor group). |
med.g1 |
median age (nonsurvivor group). |
q3.g1 |
third quartile of age (nonsurvivor group). |
mean.g1 |
mean age (nonsurvivor group). |
sd.g1 |
standard deviation of age (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of age (survivor group). |
med.g2 |
median age (survivor group). |
q3.g2 |
third quartile of age (survivor group). |
mean.g2 |
mean age (survivor group). |
sd.g2 |
standard deviation of age (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing aspartate transaminase (ASAT) levels of COVID-19 infected patients who died and those who survived. The unit of measurement for the ASAT levels is U/L. The rows in the data set correspond to the primary studies. Compared to the "raw" version (i.e., dat.asat_raw
), this data set excludes the primary study of Qi et al. (2021) due to its small sample size in the nonsurvivor group.
dat.asat
dat.asat
A data frame with 26 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of the ASAT levels (nonsurvivor group). |
med.g1 |
median ASAT level (nonsurvivor group). |
q3.g1 |
third quartile of the ASAT levels (nonsurvivor group). |
mean.g1 |
mean ASAT level (nonsurvivor group). |
sd.g1 |
standard deviation of the ASAT levels (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of the ASAT levels (survivor group). |
med.g2 |
median ASAT level (survivor group). |
q3.g2 |
third quartile of the ASAT levels (survivor group). |
mean.g2 |
mean ASAT level (survivor group). |
sd.g2 |
standard deviation of the ASAT levels (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
Qi X., Liu Y., Wang J., Fallowfield J.A., Wang J., Li X., Shi J., Pan H., Zou S., Zhang H., and others. (2021). Clinical course and risk factors for mortality of COVID-19 patients with pre-existing cirrhosis: A multicentre cohort study, Gut, 70, 433–436.
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing aspartate transaminase (ASAT) levels of COVID-19 infected patients who died and those who survived. The unit of measurement for the ASAT levels is U/L. The rows in the data set correspond to the primary studies.
dat.asat_raw
dat.asat_raw
A data frame with 27 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of the ASAT levels (nonsurvivor group). |
med.g1 |
median ASAT level (nonsurvivor group). |
q3.g1 |
third quartile of the ASAT levels (nonsurvivor group). |
mean.g1 |
mean ASAT level (nonsurvivor group). |
sd.g1 |
standard deviation of the ASAT levels (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of the ASAT levels (survivor group). |
med.g2 |
median ASAT level (survivor group). |
q3.g2 |
third quartile of the ASAT levels (survivor group). |
mean.g2 |
mean ASAT level (survivor group). |
sd.g2 |
standard deviation of the ASAT levels (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing creatine kinase (CK) levels of COVID-19 infected patients who died and those who survived. The unit of measurement for the CK levels is U/L. The rows in the data set correspond to the primary studies. Compared to the "raw" version (i.e., dat.asat_raw
), this data set excludes the primary study of Qi et al. (2021) due to its small sample size in the nonsurvivor group.
dat.ck
dat.ck
A data frame with 17 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of the CK levels (nonsurvivor group). |
med.g1 |
median CK level (nonsurvivor group). |
q3.g1 |
third quartile of the CK levels (nonsurvivor group). |
mean.g1 |
mean CK level (nonsurvivor group). |
sd.g1 |
standard deviation of the CK levels (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of the CK levels (survivor group). |
med.g2 |
median CK level (survivor group). |
q3.g2 |
third quartile of the CK levels (survivor group). |
mean.g2 |
mean CK level (survivor group). |
sd.g2 |
standard deviation of the CK levels (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
Qi X., Liu Y., Wang J., Fallowfield J.A., Wang J., Li X., Shi J., Pan H., Zou S., Zhang H., and others. (2021). Clinical course and risk factors for mortality of COVID-19 patients with pre-existing cirrhosis: A multicentre cohort study, Gut, 70, 433–436.
A data set from the meta-analysis of Katzenschlager et al. (2021). Specifically, this data set corresponds to the meta-analysis comparing creatine kinase (CK) levels of COVID-19 infected patients who died and those who survived. The unit of measurement for the CK levels is U/L. The rows in the data set correspond to the primary studies.
dat.ck_raw
dat.ck_raw
A data frame with 18 rows and 13 columns:
author |
first author of the primary study and the journal name. |
n.g1 |
number of subjects (nonsurvivor group). |
q1.g1 |
first quartile of the CK levels (nonsurvivor group). |
med.g1 |
median CK level (nonsurvivor group). |
q3.g1 |
third quartile of the CK levels (nonsurvivor group). |
mean.g1 |
mean CK level (nonsurvivor group). |
sd.g1 |
standard deviation of the CK levels (nonsurvivor group). |
n.g2 |
number of subjects (survivor group). |
q1.g2 |
first quartile of the CK levels (survivor group). |
med.g2 |
median CK level (survivor group). |
q3.g2 |
third quartile of the CK levels (survivor group). |
mean.g2 |
mean CK level (survivor group). |
sd.g2 |
standard deviation of the CK levels (survivor group). |
Katzenschlager S., Zimmer A.J., Gottschalk C., Grafeneder J., Seitel A., Maier-Hein L., Benedetti A., Larmann J., Weigand M.A., McGrath S., and Denkinger C.M. (2021). Can we predict the severe course of COVID-19 - A systematic review and meta-analysis of indicators of clinical outcome? PLOS One, 16, e0255154.
A data set based on a meta-analysis of Patient Health Questionnaire-9 (PHQ-9) scores (Thombs et al. 2014, Levis et al. 2019). This data set was obtained by performing the following data processing items to dat.phq9_raw
. We randomly selected 14 of the primary studies to report S1 summary statistics, 14 to report S2 summary statistics, 15 to report S3 summary statistics, and 15 to report S4 summary statistics. Since some of the mean-based methods require the sample quantiles to be strictly positive and PHQ-9 scores of 0 were observed in some of the primary studies, we added a value of 0.01 to sample quantiles with a value of 0. Additionally, since some of the mean-based methods do not allow for "ties" in the quantiles (e.g., when the minimum value equals the first quartile value), we added a value of 0.25 to the larger quantile in the event of ties.
dat.phq9
dat.phq9
A data frame with 58 rows and 9 columns:
author |
first author of the primary study and the year of publication. |
n.g1 |
number of subjects. |
min.g1 |
minimum PHQ-9 score. |
q1.g1 |
first quartile of the PHQ-9 scores. |
med.g1 |
median PHQ-9 score. |
q3.g1 |
third quartile of the PHQ-9 scores. |
max.g1 |
maximum PHQ-9 score. |
mean.g1 |
mean PHQ-9 score. |
sd.g1 |
standard deviation of the PHQ-9 scores. |
Thombs B.D., Benedetti A., Kloda L.A., et al. (2014). The diagnostic accuracy of the Patient Health Questionnaire-2 (PHQ-2), Patient Health Questionnaire-8 (PHQ-8), and Patient Health Questionnaire-9 (PHQ-9) for detecting major depression: protocol for a systematic review and individual patient data meta-analyses. Systematic Reviews. 3(1):1-16.
Levis B., Benedetti A., Thombs B.D., and the DEPRESsion Screening Data (DEPRESSD) Collaboration. (2019). The diagnostic accuracy of the Patient Health Questionnaire-9 (PHQ-9) for detecting major depression. BMJ. 365:l1476.
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.
A data set based on a meta-analysis of Patient Health Questionnaire-9 (PHQ-9) scores (Thombs et al. 2014, Levis et al. 2019). This particular data set is from Table S1 and Figure 3 in McGrath et al. (2020); See McGrath et al. (2020) for additional details. The rows in the data set correspond to the primary studies.
dat.phq9_raw
dat.phq9_raw
A data frame with 58 rows and 9 columns:
author |
first author of the primary study and the year of publication. |
n.g1 |
number of subjects. |
min.g1 |
minimum PHQ-9 score. |
q1.g1 |
first quartile of the PHQ-9 scores. |
med.g1 |
median PHQ-9 score. |
q3.g1 |
third quartile of the PHQ-9 scores. |
max.g1 |
maximum PHQ-9 score. |
mean.g1 |
mean PHQ-9 score. |
sd.g1 |
standard deviation of the PHQ-9 scores. |
Thombs B.D., Benedetti A., Kloda L.A., et al. (2014). The diagnostic accuracy of the Patient Health Questionnaire-2 (PHQ-2), Patient Health Questionnaire-8 (PHQ-8), and Patient Health Questionnaire-9 (PHQ-9) for detecting major depression: protocol for a systematic review and individual patient data meta-analyses. Systematic Reviews. 3(1):1-16.
Levis B., Benedetti A., Thombs B.D., and the DEPRESsion Screening Data (DEPRESSD) Collaboration. (2019). The diagnostic accuracy of the Patient Health Questionnaire-9 (PHQ-9) for detecting major depression. BMJ. 365:l1476.
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.
This function performs some descriptive analyses. Specifically, this function describes: (i) the number of studies reporting various summary statistics, (ii) the Bowley skewness (Bowley, 1901) in the primary studies, and (iii) the results of a skewness test (Shi et al., 2023) applied to the summary statistics reported in the primary studies.
describe_studies(data, method = "qe", group_labels = c("Group 1", "Group 2"))
describe_studies(data, method = "qe", group_labels = c("Group 1", "Group 2"))
data |
data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:
For two group studies, this data frame can also contain the following columns for the summary data of the second group: |
||||||||||||||||||||||||||
method |
character string specifying the sets of summary statistics to consider. If this argument is set to |
||||||||||||||||||||||||||
group_labels |
vector of character strings specifying the names corresponding to groups 1 and 2, respectively. This argument is only applicable when the meta-analysis consists of two-group studies. By default, this argument is set to |
an object of class "describe_studies"
. The object is a list with the following components:
description |
data frame containing the results of the descriptive analyses. |
bowley_g1 |
vector containing the study-specific Bowley skewness values in group 1. |
bowley_g2 |
vector containing the study-specific Bowley skewness values in group 2. |
skew_test_g1 |
data frame containing the results of the skewness test of Shi et al. (2023) based on the group 1 data. The data frame contains the test statistic values, critical values at the 0.05 level, and indicators of statistical significance at the 0.05 level. |
skew_test_g2 |
data frame containing the results of the skewness test of Shi et al. (2023) based on the group 2 data. The data frame contains the test statistic values, critical values at the 0.05 level, and indicators of statistical significance at the 0.05 level. |
The results are printed with the print.describe_studies
function.
Bowley, A.L. (1901). Elements of Statistics. London: P.S. King & Son.
McGrath S., Zhao X., Ozturk O., Katzenschlager S., Steele R., and Benedetti A. (2024). metamedian: An R package for meta-analyzing studies reporting medians. Research Synthesis Methods. 15(2):332-346.
Shi J., Luo D., Wan X., Yue L., Liu J., Bian Z., Tong T. (2023). Detecting the skewness of data from the five-number summary and its application in meta-analysis. Statistical Methods in Medical Research. 32(7):1338-1360.
describe_studies(data = dat.age, group_labels = c("Nonsurvivors", "Survivors"))
describe_studies(data = dat.age, group_labels = c("Nonsurvivors", "Survivors"))
The function meta-analyzes one-group or two-group studies where each study 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.
This function estimates the study-specific means and their standard errors from the S1, S2, S3, or S4 summary data. When studies report S1, S2, or S3 summary data, a number of approaches can be applied to estimate the study-specific means and their standard errors. Then, this function estimates the pooled mean (for one-group studies) or the pooled difference of means (for two-group studies) based on the standard inverse variance method via the rma.uni
function. The convention used for calculating differences of means in two-group studies is: mean in group 1 minus mean in group 2.
metamean( data, mean_method = "mln", se_method, sd_method, nboot = 1000, pool_studies = TRUE, ... )
metamean( data, mean_method = "mln", se_method, sd_method, nboot = 1000, pool_studies = TRUE, ... )
data |
data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:
For two group studies, this data frame can also contain the following columns for the summary data of the second group: |
||||||||||||||||
mean_method |
character string specifying the approach used to estimate the study-specific means. The options are the following:
|
||||||||||||||||
se_method |
character string specifying the approach used to estimate the standard errors of the study-specific means estimators in scenarios S1, S2, and S3. The options are the following:
|
||||||||||||||||
sd_method |
character string specifying the approach used to estimate the study-specific standard deviations when applying the naive standard error estimator (if applicable). The options are the following:
|
||||||||||||||||
nboot |
integer specifying the number of bootstrap samples to use when using parametric bootstrap to estimate the study-specific standard errors in scenarios S1, S2, and S3. The default is |
||||||||||||||||
pool_studies |
logical scalar specifying whether to meta-analyze the studies. If this argument is set to |
||||||||||||||||
... |
optional arguments that are passed into the |
an object of class "rma.uni". See documentation of rma.uni
.
Bland M. (2015). Estimating mean and standard deviation from the sample size, three quartiles, minimum, and maximum. International Journal of Statistics in Medical Research. 4(1):57-64.
Cai S., Zhou J., and Pan J. (2021). Estimating the sample mean and standard deviation from order statistics and sample size in meta-analysis. Statistical Methods in Medical Research. 30(12):2701-2719.
Hozo S.P., Djulbegovic B., and Hozo I. (2005). Estimating the mean and variance from the median, range, and the size of a sample. BMC Medical Research Methodology. 5(1):1-10.
Luo D., Wan X., Liu J., and Tong T. (2016). Optimally estimating the sample mean from the sample size, median, mid-range, and/or mid-quartile range. Statistical Methods in Medical Research. 27(6):1785-805.
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.
McGrath S., Katzenschlager S., Zimmer A.J., Seitel A., Steele R., and Benedetti A. (2023). Standard error estimation in meta-analysis of studies reporting medians. Statistical Methods in Medical Research. 32(2):373-388.
McGrath S., Zhao X., Ozturk O., Katzenschlager S., Steele R., and Benedetti A. (2024). metamedian: An R package for meta-analyzing studies reporting medians. Research Synthesis Methods. 15(2):332-346.
Shi J., Luo D., Weng H., Zeng X.T., Lin L., Chu H., and Tong T. (2020a). Optimally estimating the sample standard deviation from the five-number summary. Research synthesis methods. 11(5):641-654.
Shi J., Tong T., Wang Y., and Genton M.G. (2020b). Estimating the mean and variance from the five-number summary of a log-normal distribution. Statistics and Its Interface. 13(4):519-531.
Wan X., Wang W., Liu J., and Tong T. (2014). Estimating the sample mean and standard deviation from the sample size, median, range and/or interquartile range. BMC Medical Research Methodology. 14(1):1-13.
Yang X., Hutson A.D., and Wang D. (2022). A generalized BLUE approach for combining location and scale information in a meta-analysis. Journal of Applied Statistics. 49(15):3846-3867.
## Method for Unknown Non-Normal Distributions metamean(data = dat.age, mean_method = "mln", se_method = "bootstrap", nboot = 50) ## Box-Cox method metamean(data = dat.age, mean_method = "bc", se_method = "bootstrap", nboot = 50) ## Quantile Matching Estimation method metamean(data = dat.age, mean_method = "qe", se_method = "bootstrap", nboot = 50)
## Method for Unknown Non-Normal Distributions metamean(data = dat.age, mean_method = "mln", se_method = "bootstrap", nboot = 50) ## Box-Cox method metamean(data = dat.age, mean_method = "bc", se_method = "bootstrap", nboot = 50) ## Quantile Matching Estimation method metamean(data = dat.age, mean_method = "qe", se_method = "bootstrap", nboot = 50)
This function is a wrapper function for the qe
, cd
, and pool.med
functions. The function implements the methods of McGrath et al. (2019), McGrath et al. (2020), and Ozturk and Balakrishnan (2020) to estimate the pooled (difference of) medians in a meta-analysis. Specifically, the function implements the (weighted) median of medians method, the Ozturk and Balakrishnan (2020) method, and the quantile matching estimation method to meta-analyze one-group studies; the function implements the (weighted) median of the difference of medians method and quantile matching estimation method to meta-analyze two-group studies.
metamedian( data, median_method = "qe", single.family = FALSE, loc.shift = FALSE, norm.approx = TRUE, coverage.prob = 0.95, cd_method = "RE", pool_studies = TRUE, ... )
metamedian( data, median_method = "qe", single.family = FALSE, loc.shift = FALSE, norm.approx = TRUE, coverage.prob = 0.95, cd_method = "RE", pool_studies = TRUE, ... )
data |
data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:
For two group studies, this data frame can also contain the following columns for the summary data of the second group: |
||||||||||||||||||||||||||
median_method |
character string specifying the approach used to estimate the study-specific means and their standard errors. The options are
|
||||||||||||||||||||||||||
single.family |
(only applicable when |
||||||||||||||||||||||||||
loc.shift |
(only applicable when |
||||||||||||||||||||||||||
norm.approx |
(only applicable when |
||||||||||||||||||||||||||
coverage.prob |
(only applicable when |
||||||||||||||||||||||||||
cd_method |
(only applicable when |
||||||||||||||||||||||||||
pool_studies |
logical scalar specifying whether to meta-analyze the studies. If this argument is set to |
||||||||||||||||||||||||||
... |
(only applicable when |
an object of class "rma.uni" (when median_method
is set to "qe"
) or a list (when median_method
is set to "mm"
, "wm"
, or "cd"
). For additional details, see rma.uni
(when median_method
is set to "qe"
), pool.med
(when median_method
is set to "mm"
or "wm"
), and cd
(when median_method
is set to "cd"
).
McGrath S., Zhao X., Qin Z.Z., Steele R., and Benedetti A. (2019). One-sample aggregate data meta-analysis of medians. Statistics in Medicine, 38, 969-984.
McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.
McGrath S., Zhao X., Ozturk O., Katzenschlager S., Steele R., and Benedetti A. (2024). metamedian: An R package for meta-analyzing studies reporting medians. Research Synthesis Methods, 15, 332-346.
Ozturk O. and Balakrishnan N. (2020). Meta‐analysis of quantile intervals from different studies with an application to a pulmonary tuberculosis data. Statistics in Medicine, 39, 4519-4537.
## Quantile Matching Estimation method metamedian(data = dat.age, median_method = "qe") ## Median of the Difference of Medians method metamedian(data = dat.age, median_method = "mm") ## Weighted Median of the Difference of Medians method metamedian(data = dat.age, median_method = "wm")
## Quantile Matching Estimation method metamedian(data = dat.age, median_method = "qe") ## Median of the Difference of Medians method metamedian(data = dat.age, median_method = "mm") ## Weighted Median of the Difference of Medians method metamedian(data = dat.age, median_method = "wm")
These functions are defunct and no longer available.
The following functions are defunct and no longer available:
qe.fit
calls should now be qe.fit
(in the ‘estmeansd’ package) calls. That is, this function has been moved to the ‘estmeansd’ pacakge.
Similarly, print.qe.fit
calls should now be print.qe.fit
(in the ‘estmeansd’ package) calls.
This function meta-analyzes the study-specific effect sizes by applying the (weighted) median of medians method (McGrath et al., 2019) in one-sample contexts and the (weighted) median of the difference of median method (McGrath et al., 2020) in two-sample contexts.
pool.med(yi, wi, norm.approx = TRUE, coverage.prob = 0.95)
pool.med(yi, wi, norm.approx = TRUE, coverage.prob = 0.95)
yi |
vector of the study-specific effect sizes (e.g., the medians or the difference of medians) |
wi |
optional vector of positive, study-specific weights (e.g., sample sizes) |
norm.approx |
optional logical scalar indicating whether normality approximation of the binomial should be used to construct an approximate confidence interval (the default is |
coverage.prob |
optional numeric scalar indicating the desired coverage probability (the default is |
For one-group studies, authors may report the sample median or mean. If these measures are supplied for yi
and weights are not provided for wi
, the function implements the median of medians (MM) method (McGrath et al., 2019).
For two-group studies, authors may report the difference of medians or the difference of means across both groups. If these measures are supplied for yi
and weights are not provided for wi
, the function implements the median of the difference of medians (MDM) method (McGrath et al., 2020).
Analogous weighted versions of the MM and MDM methods can be applied when study-specific sample sizes are provided for wi
.
The confidence interval around the pooled estimate is constructed by inverting the sign test.
A list with components
pooled.est |
Pooled estimate |
ci.lb |
Lower bound of confidence interval |
ci.ub |
Upper bound of confidence interval |
cov.level |
Theoretical coverage of the confidence interval around the pooled estimate. When |
McGrath S., Zhao X., Qin Z.Z., Steele R., and Benedetti A. (2019). One-sample aggregate data meta-analysis of medians. Statistics in Medicine, 38, 969-984.
McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.
## Storing data (study-specific difference of medians) yi <- c(5.23, 3.10, 0.50, 0.78, 3.48, 0.59, 2.20, 5.06, 4.00) ## Meta-analysis of the difference of medians pool.med(yi)
## Storing data (study-specific difference of medians) yi <- c(5.23, 3.10, 0.50, 0.78, 3.48, 0.59, 2.20, 5.06, 4.00) ## Meta-analysis of the difference of medians pool.med(yi)
Print method for objects of class "describe_studies"
## S3 method for class 'describe_studies' print(x, ...)
## S3 method for class 'describe_studies' print(x, ...)
x |
object of class "describe_studies". |
... |
other arguments. |
No value is returned.
The function applies the quantile estimation (QE) method (McGrath et al., 2020) to meta-analyze one-group or two-group studies where each study 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.
For one-group studies, the function estimates the pooled median. For two-group studies, the function estimates the pooled raw difference of medians across groups. The convention used for calculating differences in two-group studies is: value in group 1 minus value in group 2.
qe( 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, pool_studies = TRUE, ... )
qe( 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, pool_studies = TRUE, ... )
min.g1 |
vector of study-specific sample minimum values (first group for two-group studies). See 'Details'. |
q1.g1 |
vector of study-specific sample first quartile values (first group for two-group studies). See 'Details'. |
med.g1 |
vector of study-specific sample median values (first group for two-group studies). See 'Details'. |
q3.g1 |
vector of study-specific sample third quartile values (first group for two-group studies). See 'Details'. |
max.g1 |
vector of study-specific sample maximum values (first group for two-group studies). See 'Details'. |
n.g1 |
vector of study-specific sample sizes (first group for two-group studies). See 'Details'. |
mean.g1 |
vector of study-specific sample mean values (first group for two-group studies). See 'Details'. |
sd.g1 |
vector of study-specific sample standard deviation values (first group for two-group studies). See 'Details'. |
min.g2 |
vector of study-specific sample minimum values of the second group for two-group studies. See 'Details'. |
q1.g2 |
vector of study-specific sample first quartile values of the second group for two-group studies. See 'Details'. |
med.g2 |
vector of study-specific sample median values of the second group for two-group studies. See 'Details'. |
q3.g2 |
vector of study-specific sample third quartile values of the second group for two-group studies. See 'Details'. |
max.g2 |
vector of study-specific sample maximum values of the second group for two-group studies. See 'Details'. |
n.g2 |
vector of study-specific sample sizes of the second group for two-group studies. See 'Details'. |
mean.g2 |
vector of study-specific sample mean values of the second group for two-group studies. See 'Details'. |
sd.g2 |
vector of study-specific sample standard deviation values of the second group for two-group studies. See 'Details'. |
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 |
pool_studies |
logical scalar specifying whether to meta-analyze the studies. If this argument is set to |
... |
optional arguments for pooling. See documentation of |
Letting denote the number of studies, provide study-specific summary data as vectors of length
. If a study does not report a given summary measure (e.g., the minimum value), give a value of
NA
for the position in the relevant vector. If no studies report a given summary measure, a vector of only NA
values need not be provided. See 'Examples' for appropriate use.
The sampling variance of the effect size for each study is estimated via the QE method. The default starting values and box constraints of the parameters in the minimization algorithm (qe.fit
) are used. After estimating the sampling variances for all studies, studies are meta-analyzed using the rma.uni
function.
An object of class "rma.uni". See documentation of rma.uni
.
McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.
## Example 1: Meta-analysis of one-group studies ## Storing data ## Note: All 6 studies report S2 med.vals <- c(6.1, 5.2, 3.1, 2.8, 4.5) q1.vals <- c(2.0, 1.6, 2.6, 0.9, 3.2) q3.vals <- c(10.2, 13.0, 8.3, 8.2, 9.9) n.vals <- c(100, 92, 221, 81, 42) ## Meta-analyze studies via QE method qe(q1.g1 = q1.vals, med.g1 = med.vals, q3.g1 = q3.vals, n.g1 = n.vals) ## Example 2: Meta-analysis of one-group studies ## Storing data ## Note: Studies 1, 2, 3, and 4 report S1, S2, S3, and S4, respectively min.vals <- c(0.7, NA, 1.1, NA) q1.vals <- c(NA, 5.2, 5.3, NA) med.vals <- c(8.7, 10.7, 11.0, NA) q3.vals <- c(NA, 15.2, 15.3, NA) max.vals <- c(22.2, NA, 24.7, NA) n.vals <- c(52, 34, 57, 90) sd.vals <- c(NA, NA, NA, 4.2) mean.vals <- c(NA, NA, NA, 12.2) ## Meta-analyze studies via QE method qe(min.g1 = min.vals, q1.g1 = q1.vals, med.g1 = med.vals, q3.g1 = q3.vals, max.g1 = max.vals, n.g1 = n.vals, mean.g1 = mean.vals, sd.g1 = sd.vals) ## Example 3: Meta-analysis of two-group studies ## Storing data ## Note: All 4 studies report S3 min.g1 <- c(2.3, 3.2, 1.9, 1.7) q1.g1 <- c(6.0, 7.1, 3.5, 3.8) med.g1 <- c(8.7, 9.5, 5.9, 6.0) q3.g1 <- c(11.3, 13.1, 10.8, 11.0) max.g1 <- c(20.6, 25.3, 17.0, 18.6) n.g1 <- c(53, 49, 66, 75) min.g2 <- c(0.4, 0.9, 0.5, 0.3) q1.g2 <- c(2.5, 3.1, 2.7, 2.3) med.g2 <- c(5.1, 6.2, 4.9, 4.7) q3.g2 <- c(9.6, 10.1, 8.8, 9.2) max.g2 <- c(20.2, 21.4, 18.8, 19.2) n.g2 <- c(50, 45, 60, 73) ## Meta-analyze studies via QE method qe(min.g1 = min.g1, q1.g1 = q1.g1, med.g1 = med.g1, q3.g1 = q3.g1, max.g1 = max.g1, n.g1 = n.g1, min.g2 = min.g2, q1.g2 = q1.g2, med.g2 = med.g2, q3.g2 = q3.g2, max.g2 = max.g2, n.g2 = n.g2)
## Example 1: Meta-analysis of one-group studies ## Storing data ## Note: All 6 studies report S2 med.vals <- c(6.1, 5.2, 3.1, 2.8, 4.5) q1.vals <- c(2.0, 1.6, 2.6, 0.9, 3.2) q3.vals <- c(10.2, 13.0, 8.3, 8.2, 9.9) n.vals <- c(100, 92, 221, 81, 42) ## Meta-analyze studies via QE method qe(q1.g1 = q1.vals, med.g1 = med.vals, q3.g1 = q3.vals, n.g1 = n.vals) ## Example 2: Meta-analysis of one-group studies ## Storing data ## Note: Studies 1, 2, 3, and 4 report S1, S2, S3, and S4, respectively min.vals <- c(0.7, NA, 1.1, NA) q1.vals <- c(NA, 5.2, 5.3, NA) med.vals <- c(8.7, 10.7, 11.0, NA) q3.vals <- c(NA, 15.2, 15.3, NA) max.vals <- c(22.2, NA, 24.7, NA) n.vals <- c(52, 34, 57, 90) sd.vals <- c(NA, NA, NA, 4.2) mean.vals <- c(NA, NA, NA, 12.2) ## Meta-analyze studies via QE method qe(min.g1 = min.vals, q1.g1 = q1.vals, med.g1 = med.vals, q3.g1 = q3.vals, max.g1 = max.vals, n.g1 = n.vals, mean.g1 = mean.vals, sd.g1 = sd.vals) ## Example 3: Meta-analysis of two-group studies ## Storing data ## Note: All 4 studies report S3 min.g1 <- c(2.3, 3.2, 1.9, 1.7) q1.g1 <- c(6.0, 7.1, 3.5, 3.8) med.g1 <- c(8.7, 9.5, 5.9, 6.0) q3.g1 <- c(11.3, 13.1, 10.8, 11.0) max.g1 <- c(20.6, 25.3, 17.0, 18.6) n.g1 <- c(53, 49, 66, 75) min.g2 <- c(0.4, 0.9, 0.5, 0.3) q1.g2 <- c(2.5, 3.1, 2.7, 2.3) med.g2 <- c(5.1, 6.2, 4.9, 4.7) q3.g2 <- c(9.6, 10.1, 8.8, 9.2) max.g2 <- c(20.2, 21.4, 18.8, 19.2) n.g2 <- c(50, 45, 60, 73) ## Meta-analyze studies via QE method qe(min.g1 = min.g1, q1.g1 = q1.g1, med.g1 = med.g1, q3.g1 = q3.g1, max.g1 = max.g1, n.g1 = n.g1, min.g2 = min.g2, q1.g2 = q1.g2, med.g2 = med.g2, q3.g2 = q3.g2, max.g2 = max.g2, n.g2 = n.g2)
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.
.
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() )
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() )
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 |
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.
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. |
McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.
## 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)
## 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)