Last data update: 2014.03.03

R: Combine p-values using the sum of z method
sumzR Documentation

Combine p-values using the sum of z method

Description

Combine p-values using the sum z method

Usage

sumz(p, weights = NULL, data = NULL, subset = NULL, na.action = na.fail)
## S3 method for class 'sumz'
print(x, ...)

Arguments

p

A vector of p-values

weights

A vector of weights

data

Optional data frame containing variables

subset

Optional vector of logicals to specify a subset of the p-values

na.action

A function indicating what should happen when data contains NAs

x

An object of class ‘sumz

...

Other arguments to be passed through

Details

Defined as

sum (w * z(p)) / sqrt(sum (w * w))

is a z where k is the number of studies and w are the weights. By default the weights are equal. In the absence of effect sizes (in which case a method for combining effect sizes woud be more appropriate anyway) best resuts are believed to be obtained with weights proportional to the square root of the sample sizes (see Zaykin reference).

The values of p should be such that 0<p<1. A warning is issued if this means that studies are omitted and an error results if as a result fewer than two studies remain. If the omitted p values had supplied weights a further warning is issued.

The plot method for class ‘metap’ calls schweder on the valid p-values

Value

An object of class ‘sumz’ and ‘metap’, a list with entries

z

Transformed sum of z values

p

Associated p-value

validp

The input vector with illegal values removed

weights

The weight vector corresponding to validp

Author(s)

Michael Dewey

References

Becker, B J. Combining significance levels. In Cooper, H and Hedges, L V, editors A handbook of research synthesis, chapter 15, pages 215–230. Russell Sage, New York, 1994.

Rosenthal, R. Combining the results of independent studies. Psychological Bulletin, 85:185–193, 1978.

Zaykin, D V. Optimally weighted Z-test is a powerful method for combining probabilities in meta-analysis. Journal of Evolutionary Biology 24:1836-1841, 2011

See Also

See also schweder

Examples

data(teachexpect)
sumz(teachexpect) # z = 2.435, p = 0.0074, from Becker
data(beckerp)
sumz(beckerp) # z = 1.53, NS, from Beckerp
data(rosenthal)
sumz(rosenthal$p) # 2.39, p = 0.009
sumz(p, df, rosenthal) # 3.01, p = 0.0013
data(validity)
sumz(validity) # z = 8.191, p = 1.25 * 10^{-16}

Results