Learn R Programming

metap (version 1.9)

meanz: Combine p values using mean z method

Description

Combines p values using the mean of z method

Usage

meanz(p, log.p = FALSE)
# S3 method for meanz
print(x, ...)

Value

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

z

The value of the mean z statistic

p

The associated p value

validp

The input vector with illegal values removed

Arguments

p

A vector of significance values

log.p

Logical, if TRUE result is returned as log(p)

x

An object of class ‘meanz

...

Other arguments to be passed through

Author

Michael Dewey

Details

Let z = _i=1^k z(p_i)kbarz = sum(z(p) / k) and s_z = s_zks_barz = s_z / sqrt k Defined as zs_z > t_k-1() ((barz / s_barz) > t_k-1(alpha)

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. As can be seen if all the p_i are equal or close to equal this gives a t=t=+-infty leading to a returned value of 0 or 1. A set of p values with small variance will necessarily give a small p value which may be smaller than that for another set all of whose primary values are less than any in the first set. See examples for a demonstration.

The plot method for class ‘metap’ calls plotp on the valid \(p\)-values.

References

becker94metap

See Also

See also plotp

Examples

Run this code
data(dat.metap)
beckerp <- dat.metap$beckerp
meanz(beckerp)
meanz(c(0.1, 0.2))  # greater than next example
meanz(c(0.3, 0.31)) # less than above
all.equal(exp(meanz(beckerp, log.p = TRUE)$p), meanz(beckerp)$p)

Run the code above in your browser using DataLab