Package 'metamedian'

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] , XiaoFei Zhao [aut], Stephan Katzenschlager [aut], Omer Ozturk [aut], Russell Steele [aut], Andrea Benedetti [aut]
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

Help Index


Meta-Analysis via the confidence distribution approach

Description

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.

Usage

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
)

Arguments

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 α1\alpha_1 values from Ozturk and Balakrishnan (2020)

alpha.2

vector of the study-specific α2\alpha_2 values from Ozturk and Balakrishnan (2020)

pooled.median.ci.level

optional numeric scalar indicating the desired coverage probability for the pooled median estimate. The default is 0.95.

method

character string specifying whether a fixed effect or random effects model is used. The options are FE (fixed effect) are RE (random effects). The default is RE.

pool_studies

logical scalar specifying whether to meta-analyze the studies. If this argument is set to FALSE, function will not meta-analyze the studies and will return a list with components yi containing the study-specific effect size estimates and sei containing the study-specific within-study standard error estimates. The default is TRUE.

Details

Letting kk denote the number of studies, provide study-specific summary data as vectors of length kk. 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.

Value

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 method is set to RE)

yi

Study-specific point estimates

vi

Study-specific sampling variances

References

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.

Examples

## 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 data set: Comparing the age between COVID-19 survivors and nonsurvivors (cleaned version)

Description

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.

Usage

dat.age

Format

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).

References

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.


Example data set: Comparing the age between COVID-19 survivors and nonsurvivors (raw version)

Description

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.

Usage

dat.age_raw

Format

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).

References

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.


Example data set: Comparing aspartate transaminase levels between COVID-19 survivors and nonsurvivors (cleaned version)

Description

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.

Usage

dat.asat

Format

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).

References

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.


Example data set: Comparing aspartate transaminase levels between COVID-19 survivors and nonsurvivors (raw version)

Description

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.

Usage

dat.asat_raw

Format

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).

References

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.


Example data set: Comparing creatine kinase levels between COVID-19 survivors and nonsurvivors (cleaned version)

Description

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.

Usage

dat.ck

Format

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).

References

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.


Example data set: Comparing creatine kinase transaminase levels between COVID-19 survivors and nonsurvivors (raw version)

Description

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.

Usage

dat.ck_raw

Format

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).

References

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.


Example data set: Patient Health Questionnaire-9 (PHQ-9) scores (processed version)

Description

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.

Usage

dat.phq9

Format

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.

References

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.


Example data set: Patient Health Questionnaire-9 (PHQ-9) scores (raw version)

Description

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.

Usage

dat.phq9_raw

Format

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.

References

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.


Descriptive statistics for meta-analyzing studies reporting medians

Description

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.

Usage

describe_studies(data, method = "qe", group_labels = c("Group 1", "Group 2"))

Arguments

data

data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:

min.g1 minimum value.
q1.g1 first quartile.
med.g1 median.
q3.g1 third quartile.
max.g1 maximum value.
n.g1 sample size.
mean.g1 sample mean.
sd.g1 sample standard deviation.
med.var.g1 sampling variance of the median (only applicable when median_method="cd").
med.ci.lb.g1 lower confidence interval bound around the median (only applicable when median_method="cd").
med.ci.ub.g1 upper confidence interval bound around the median (only applicable when median_method="cd").
alpha.1.g1 α1\alpha_1 values from Ozturk and Balakrishnan (2020) (only applicable when median_method="cd").
alpha.2.g1 α2\alpha_2 values from Ozturk and Balakrishnan (2020) (only applicable when median_method="cd").

For two group studies, this data frame can also contain the following columns for the summary data of the second group: min.g2, q1.g2, med.g2, q3.g2, max.g2, n.g2, mean.g2, and sd.g2.

method

character string specifying the sets of summary statistics to consider. If this argument is set to "cd", the summary statistics for the CD method (see C1/C2, C3, C4, C5 in cd) are considered. Otherwise, the S1, S2, S3, and S4 summary statistics described in qe are considered.

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 c('Group 1', 'Group 2').

Value

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.

References

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.

Examples

describe_studies(data = dat.age, group_labels = c("Nonsurvivors", "Survivors"))

Meta-Analysis of the (difference of) means

Description

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.

Usage

metamean(
  data,
  mean_method = "mln",
  se_method,
  sd_method,
  nboot = 1000,
  pool_studies = TRUE,
  ...
)

Arguments

data

data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:

min.g1 minimum value.
q1.g1 first quartile.
med.g1 median.
q3.g1 third quartile.
max.g1 maximum value.
n.g1 sample size.
mean.g1 sample mean.
sd.g1 sample standard deviation.

For two group studies, this data frame can also contain the following columns for the summary data of the second group: min.g2, q1.g2, med.g2, q3.g2, max.g2, n.g2, mean.g2, and sd.g2.

mean_method

character string specifying the approach used to estimate the study-specific means. The options are the following:

'hozo/wan/bland' Method recommended by Wan et al. (2014), i.e., the method of Hozo et al. (2005) in scenario S1, method of Wan et al. (2014) in scenario S2, and method of Bland (2015) in scenario S3.
'luo' Method of Luo et al. (2018).
'shi_lognormal' Method of Shi et al. (2020b).
'qe' Quantile Matching Estimation method (McGrath et al. 20220).
'bc' Box-Cox method (McGrath et al. 2020).
'mln' Method for Unknown Non-Normal Distributions (Cai et al. 2021).
'yang' Method of Yang et al. (2022) under the assumption of normality.
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:

'naive' Uses the estimated standard deviation divided by the square root of the sample size as the estimate of the standard error of the mean estimator. This is the default option when mean_method is set to 'wan', 'luo', or 'shi_lognormal'. The approach used to estimate the standard deviation is specified by the sd_method argument.
'bootstrap' Parametric bootstrap approach described by McGrath et al. (2023). This option is only available (and is the default option) when mean_method is set to 'qe', 'bc', or 'mln'.
'plugin' Uses the analytically derived standard error of the mean estimator, and plugs in the estimated standard deviation in place of the distributional standard deviation. This option is only available (and is the default option) when mean_method is set to 'yang'.
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:

'wan' Method of Wan et al. (2014). This is the default option when mean_method is set to 'hozo/wan/bland/hozo'.
'wan/shi_normal' Method recommended by Shi et al. (2020a), i.e., the method of Wan et al. (2014) in scenarios S1 and S2 and the method of Shi et al. (2020a) in scenario S3. This is the default option when mean_method is set to 'luo'.
'shi_lognormal' Method of Shi et al. (2020b). This is the default option when mean_method is set to 'shi_lognormal'.
'qe' Quantile Matching Estimation method (McGrath et al. 20220). This is the default option when mean_method is set to 'qe'.
'bc' Box-Cox method (McGrath et al. 2020). This is the default option when mean_method is set to 'bc'.
'mln' Method for Unknown Non-Normal Distributions (Cai et al. 2021). This is the default option when mean_method is set to 'mln'.
'yang' Method of Yang et al. (2022) under the assumption of normality. This is the default option when mean_method is set to 'yang'.
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 1000.

pool_studies

logical scalar specifying whether to meta-analyze the studies. If this argument is set to FALSE, function will not meta-analyze the studies and will return a list with components yi containing the study-specific outcome measure estimates and sei containing the study-specific within-study standard error estimates. The default is TRUE.

...

optional arguments that are passed into the rma.uni function for pooling. See documentation of rma.uni.

Value

an object of class "rma.uni". See documentation of rma.uni.

References

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.

Examples

## 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)

Meta-Analysis of the (difference of) medians

Description

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.

Usage

metamedian(
  data,
  median_method = "qe",
  single.family = FALSE,
  loc.shift = FALSE,
  norm.approx = TRUE,
  coverage.prob = 0.95,
  cd_method = "RE",
  pool_studies = TRUE,
  ...
)

Arguments

data

data frame containing the study-specific summary data. For one-group studies, this data frame can contain the following columns:

min.g1 minimum value.
q1.g1 first quartile.
med.g1 median.
q3.g1 third quartile.
max.g1 maximum value.
n.g1 sample size.
mean.g1 sample mean.
sd.g1 sample standard deviation.
med.var.g1 sampling variance of the median (only applicable when median_method="cd").
med.ci.lb.g1 lower confidence interval bound around the median (only applicable when median_method="cd").
med.ci.ub.g1 upper confidence interval bound around the median (only applicable when median_method="cd").
alpha.1.g1 α1\alpha_1 values from Ozturk and Balakrishnan (2020) (only applicable when median_method="cd").
alpha.2.g1 α2\alpha_2 values from Ozturk and Balakrishnan (2020) (only applicable when median_method="cd").

For two group studies, this data frame can also contain the following columns for the summary data of the second group: min.g2, q1.g2, med.g2, q3.g2, max.g2, n.g2, mean.g2, and sd.g2.

median_method

character string specifying the approach used to estimate the study-specific means and their standard errors. The options are

"mm" Median of Medians (McGrath et al. 2019) for one-group studies and Median of the Difference of Medians (McGrath et al. 2020) for two group studies.
"wm" Weighted Median of Medians (McGrath et al. 2019) for one-group studies and Weighted Median of the Difference of Medians (McGrath et al. 2020) for two group studies.
"qe" Quantile Matching Estimation (McGrath et al. 2020). This approach is applicable for one-group studies or two-group studies. This is the default option.
"cd" Confidence Distribution (Ozturk and Balakrishnan 2020). This approach is applicable for one-group studies.
single.family

(only applicable when median_method is set to "qe") 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 FALSE. See 'Details' of qe.study.level.

loc.shift

(only applicable when median_method is set to "qe") logical scalar indicating that for two-group studies, distributions are assumed to only differ by a location shift. The default is FALSE. See 'Details' of qe.study.level.

norm.approx

(only applicable when median_method is set to "mm" or "wm") logical scalar indicating whether normality approximation of the binomial should be used to construct an approximate confidence interval. The default is TRUE.

coverage.prob

(only applicable when median_method is set to "mm", "wm", or "cd") numeric scalar indicating the desired coverage probability for the pooled (difference of medians) estimate. The default is 0.95.

cd_method

(only applicable when median_method is set to "cd") character string specifying whether a fixed effect or random effects model is used. The options are FE (fixed effect) are RE (random effects). The default is RE.

pool_studies

logical scalar specifying whether to meta-analyze the studies. If this argument is set to FALSE, function will not meta-analyze the studies and will return a list with components yi containing the study-specific outcome measure estimates and sei containing the study-specific within-study standard error estimates. The default is TRUE.

...

(only applicable when median_method is set to "qe") optional arguments that are passed into the rma.uni function for pooling. See documentation of rma.uni.

Value

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").

References

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.

Examples

## 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")

Defunct functions in package ‘metamedian’

Description

These functions are defunct and no longer available.

Details

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.


Meta-Analysis via median of (the difference of) medians method

Description

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.

Usage

pool.med(yi, wi, norm.approx = TRUE, coverage.prob = 0.95)

Arguments

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 TRUE).

coverage.prob

optional numeric scalar indicating the desired coverage probability (the default is 0.95).

Details

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.

Value

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 norm.approx is set to TRUE, the theoretical coverage is the same as the value specified by coverage.prob. When norm.approx is set to FALSE, the theoretical coverage is set to the smallest possible value greater than the value specified by coverage.prob.

References

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.

Examples

## 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 "describe_studies" objects

Description

Print method for objects of class "describe_studies"

Usage

## S3 method for class 'describe_studies'
print(x, ...)

Arguments

x

object of class "describe_studies".

...

other arguments.

Value

No value is returned.

See Also

describe_studies


Meta-Analysis via quantile estimation method

Description

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.

Usage

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,
  ...
)

Arguments

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 FALSE). See 'Details' of qe.study.level.

loc.shift

logical scalar indicating that for two-group studies, distributions are assumed to only differ by a location shift (the default is FALSE). See 'Details' of qe.study.level.

pool_studies

logical scalar specifying whether to meta-analyze the studies. If this argument is set to FALSE, function will not meta-analyze the studies and will return a list with components yi containing the study-specific effect size estimates and sei containing the study-specific within-study standard error estimates. The default is TRUE.

...

optional arguments for pooling. See documentation of rma.uni.

Details

Letting kk denote the number of studies, provide study-specific summary data as vectors of length kk. 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.

Value

An object of class "rma.uni". See documentation of rma.uni.

References

McGrath S., Sohn H., Steele R., and Benedetti A. (2020). Meta-analysis of the difference of medians. Biometrical Journal, 62, 69-98.

Examples

## 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)

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 FALSE). See 'Details'.

loc.shift

logical scalar indicating that for two-group studies, distributions are assumed to only differ by a location shift (the default is FALSE). See 'Details'.

qe.fit.control.g1

optional list of control parameters for qe.fit (first group for two-group studies).

qe.fit.control.g2

optional list of control parameters for qe.fit of the second group for two-group studies.

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)