sumz {metap} | R Documentation |
Combine p-values using the sum of z (Stouffer's) method
Description
Combine \(p\)-values using the sum of z method
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 |
A vector of significance 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 |
log.p |
Logical, if TRUE result is returned as log(p) |
log.input |
Logical, if TRUE the input \(p\) values are assumed to be logged |
x |
An object of class ‘ |
... |
Other arguments to be passed through |
Details
Defined as \[\frac{\sum_{i=1}^k w_i z(p_i)}{\sqrt {\sum_{i=1}^k w_i ^ 2}}\] is a \(z\) where \(k\) is the number of studies and \(w\) are the weights (Stouffer et al. 1949). 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 (Zaykin 2011)
The values of \(p_i\) should be such that \(0 < p_i < 1\) and a warning is given if that is not true. A warning is given if, possibly as a result of removing illegal values, fewer than two values remain and the return values are set to NA. If the omitted \(p\) values had supplied weights a further warning is issued.
The log.input
parameter may be beneficial
when the input values are already logged and would be
small if exponentiated since it avoids a
conversion.
The plot method for class ‘metap
’ calls plotp
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 |
Author(s)
Michael Dewey
References
Becker BJ (1994).
“Combining significance levels.”
In Cooper H, Hedges LV (eds.), A handbook of research synthesis, 215–230.
Russell Sage, New York.
Rosenthal R (1978).
“Combining results of independent studies.”
Psychological Bulletin, 85, 185–193.
Stouffer SA, Suchman EA, DeVinney LC, Star SA, Williams RMJ (1949).
The American soldier, vol 1: Adjustment during army life.
Princeton University Press, Princeton.
Zaykin DV (2011).
“Optimally weighted Z–test is a powerful method for combining probabilities in meta–analysis.”
Journal of Evolutionary Biology, 24, 1836–1841.
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)