Learn R Programming

heterometa (version 0.4)

higgins: 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 higgins
print(x, type = "I2", na.print = "", ...)

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

Arguments

Q

Numeric: a vector of heterogeneity ^2chi-squared 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

Author

Michael Dewey

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 . 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 = Qk - 1, I^2 = H^2 - 1H^2, H^2 = - 1I^2 - 1.

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

References

higgins02heterometa

Examples

Run this code
# 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])

Run the code above in your browser using DataLab