Type: Package
Title: Convert Various Meta-Analysis Heterogeneity Measures
Version: 0.3
Date: 2024-07-09
Description: Published meta-analyses routinely present one of the measures of heterogeneity introduced in Higgins and Thompson (2002) <doi:10.1002/sim.1186>. For critiquing articles it is often better to convert to another of those measures. Some conversions are provided here and confidence intervals are also available.
Depends: R (≥ 3.5.0)
Imports: Rdpack (≥ 0.7),mathjaxr (≥ 0.8-3)
RdMacros: Rdpack,mathjaxr
BuildManual: TRUE
License: GPL-2
LazyLoad: yes
NeedsCompilation: no
Packaged: 2024-07-09 08:38:10 UTC; MichaelUser
Author: Michael Dewey ORCID iD [aut, cre]
Maintainer: Michael Dewey <lists@dewey.myzen.co.uk>
Repository: CRAN
Date/Publication: 2024-07-09 09:30:02 UTC

Convert Various Meta-Analysis Heterogeneity Measures

Description

Published meta-analyses routinely present one of the measures of heterogeneity introduced in Higgins and Thompson (2002) <doi:10.1002/sim.1186>. For critiquing articles it is often better to convert to another of those measures. Some conversions are provided here and confidence intervals are also available.

Details

Index of help topics:

dat.higgins02           Example data
heterometa-package      Convert Various Meta-Analysis Heterogeneity
                        Measures
higgins                 Compute heterogeneity statistics after Higgins

Published meta–analyses often only provide a subset of the heterogeneity measures first described in Higgins and Thompson (2002). This package provides a way of converting between some of them. It allows for the input of I2, Q or p and outputs Q, H, I2, and confidence intervals for them. It also contains the data used as examples in that original article.

References

Higgins JPT, Thompson SG (2002). “Quantifying heterogeneity in a meta–analysis.” Statistics in Medicine, 21, 1539–1558. doi:10.1002/sim.1186.


Example data

Description

The package contains the following dataset: higgins02.

Usage

data(dat.higgins02)

Format

A data frame with 5 observations (meta-analyses) on 13 variables:

Q

Values of the heterogeneity \(\chi^2\)

trials

The number of studies in each meta-analysis

tau2

The value of \(\tau^2\)

pval

The associated p-value

H

The value of H

Hlo

Lower limit of the interval for H

Hhi

Upper limit of the interval for H

R

The value of R

Rlo

Lower limit of the interval for R

Rhi

Upper limit of the interval for R

I2

The value of \(I^2\)

I2lo

Lower limit of the interval for \(I^2\)

I2hi

Upper limit of the interval for \(I^2\)

Note

These are values from Higgins and Thompson (2002). They are provided here for testing the package. The row names of the data frame are labels for the topic of the meta-analysis: Albumin, AdjuvantChemo, Sclerotherapy, CDPCholine, GammaNail. The value for \(I^2\) for AdjuvantChemo is as given in the article but is almost certainly a typo for 29 not 20.

Not all the variables are used in this package but are here for reference or possible use elsewhere.

Author(s)

Michael Dewey

References

Higgins JPT, Thompson SG (2002). “Quantifying heterogeneity in a meta–analysis.” Statistics in Medicine, 21, 1539–1558. doi:10.1002/sim.1186.

Examples

data(dat.higgins02)

Internal functions

Description

Functions for internal use

Usage

parchck(Q = NULL, k = NULL, I2 = NULL, pval = NULL, slab = NULL, conflevel = 95)

Details

Not to be called by the user


Compute heterogeneity statistics after Higgins

Description

Computes various statistics suggested by Higgins and Thompson for quantifying heterogeneity in meta-analysis

Usage

higgins(Q = NULL, k = NULL, I2 = NULL,
   pval = NULL, slab = NULL, conflevel = 95)
## S3 method for class 'higgins'
print(x, type = "I2", na.print = "", ...)

Arguments

Q

Numeric: a vector of heterogeneity \(\chi^2\) from the meta–analyses

k

Numeric: a vector of number of studies in each meta-analysis

I2

Numeric: a vector of values of \(I^2\)

pval

Numeric: a vector of \(p\) values

slab

Character: a vector of labels for the meta-analyses

conflevel

Numeric: a vector of confidence levels

x

An object of class higgins

type

One of "H", "I2", "both"

na.print

What to print instead of NA

...

Argument(s) to be passed through

Details

Either Q or pval or I2 should be provided. If I2 is provided it may be either as a percentage or a proportion. If a single value is given for conflevel it is used for all the analyses.

Limited error checks for illegal parameters are performed. If conflevel is \(<=1\) the function proceeds assuming that was meant as a value of \(\alpha\). If the parameters are supplied as vectors a check is made for equal length. If they are not then a warning is issued but the function tries to return a sensible result which should be checked to see if it is what was desired.

For reference the formulae used are \(Q = H^2 (k - 1)\), \(H^2 = \frac{Q}{k - 1}\), \(I^2 = \frac{H^2 - 1}{H^2}\), \(H^2 = - \frac{1}{I^2 - 1}\).

The print method allows for printing \(H\) or \(I^2\) or both of these and this is controlled by the parameter type.

Value

A list of type higgins containing

H

A data frame with columns Q, k, H, ll, ul, where ll and ul are the confidence limits

I2

A data frame with columns Q, k, I2, ll, ul

call

The call

Note

\(I^2\) is always printed as a percentage even if the input parameter was supplied as a proportion.

Author(s)

Michael Dewey

References

Higgins JPT, Thompson SG (2002). “Quantifying heterogeneity in a meta–analysis.” Statistics in Medicine, 21, 1539–1558. doi:10.1002/sim.1186.

Examples

# first the examples one by one
higgins(14.4, 24) # 1    (1, 1.34)      0 (0, 45)
higgins(14.1, 11) # 1.19 (1, 1.64)     20 (0, 65) probably a typo for 29
higgins(81.5, 19) # 2.13 (1.71, 2.64)  78 (66, 86)
higgins(41.5, 7)  # 2.63 (1.90, 3.65)  86 (72, 92)
higgins(130.3, 3) # 8.07 (6.08, 10.72) 98 (97, 99)
# now repeat getting from dat.higgins02
data(dat.higgins02)
dat <- dat.higgins02
with(dat, higgins(Q, trials, slab = rownames(dat.higgins02)))
# supply I2 or pval
higgins(I2 = dat$I2[3], k = dat$trials[3])
higgins(pval = dat$pval[3], k = dat$trials[3])