sumz: Combine p-values using the sum of z (Stouffer's) method

View source: R/sumz.R

sumzR Documentation

Combine p-values using the sum of z (Stouffer's) method

Description

Combine \mjseqnp-values using the sum z method\loadmathjax

Usage

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

Arguments

p \sigvec
weights

A vector of weights

data

Optional data frame containing variables

subset

Optional vector of logicals to specify a subset of the \mjseqnp-values

na.action

A function indicating what should happen when data contains NAs

log.p \logp
log.input \loginput
x

An object of class ‘sumz

...

Other arguments to be passed through

Details

Defined as \mjdeqn\frac\sum_i=1^k w_i z(p_i)\sqrt \sum_i=1^k w_i ^ 2sum (w * z(p)) / sqrt(sum (w * w)) is a \mjseqnz where \mjseqnk is the number of studies and \mjseqnw are the weights \insertCitestouffer49metap. By default the weights are equal. In the absence of effect sizes (in which case a method for combining effect sizes would be more appropriate anyway) best results are believed to be obtained with weights proportional to the square root of the sample sizes \insertCitezaykin11metap

\insertNoCite

becker94metap \insertNoCiterosenthal78metap

\ltlt

two If the omitted \mjseqnp values had supplied weights a further warning is issued.

\plotmethod

Value

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

z

Transformed sum of \mjseqnz values

p

Associated \mjseqnp-value

validp

The input vector with illegal values removed

weights

The weight vector corresponding to validp

Author(s)

Michael Dewey

References

\insertAllCited

See Also

See also plotp

Examples

data(dat.metap)
teachexpect <- dat.metap$teachexpect
sumz(teachexpect) # z = 2.435, p = 0.0074, from Becker
beckerp <- dat.metap$beckerp
sumz(beckerp) # z = 1.53, NS, from Beckerp
rosenthal <- dat.metap$rosenthal
sumz(rosenthal$p) # 2.39, p = 0.009
sumz(p, df, rosenthal) # 3.01, p = 0.0013
validity <- dat.metap$validity$p
sumz(validity) # z = 8.191, p = 1.25 * 10^{-16}
all.equal(exp(sumz(validity, log.p = TRUE)$p), sumz(validity)$p)
all.equal(sumz(log(validity), log.input = TRUE)$p, sumz(validity)$p)

metap documentation built on Oct. 9, 2023, 5:10 p.m.