| invchisq {metap} | R Documentation |
Combine p values using the inverse chi squared method
Description
Combine \(p\)-values by the inverse chi-squared method, also known as Lancaster's method
Usage
invchisq(p, k, data = NULL, subset = NULL, na.action = na.fail, log.p = FALSE)
## S3 method for class 'invchisq'
print(x, ...)
Arguments
p |
A vector of significance values |
k |
A vector of degrees of freedom to use, see details |
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) |
x |
An object of class ‘ |
... |
Other arguments to be passed through |
Details
Defined as \[\sum_{i=1}^n \chi^2_{k_i}(p_i) > \chi^2_{\sum{k_i}}(\alpha)\]
If k is a single value it is used for all the p
of which there are n.
If any value of \(k_i\le0\) then the corresponding \(p_i\)
is not included.
The values of \(p_i\) should be such that \(0 < p_i\le 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.
The plot method for class ‘metap’ calls plotp on the valid p-values.
Inspection of the distribution of \(p\)-values is highly recommended as extreme values in opposite directions do not cancel out. See last example. This may not be what you want.
Value
An object of class ‘invchisq’ and ‘metap’,
a list with entries
chisq |
Value of chi-squared statistic |
df |
Associated degrees of freedom |
p |
Associated p-value |
validp |
The input vector with the illegal values removed |
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.
Lancaster HO (1949). “Combination of probabilities arising from data in discrete distributions.” Biometrika, 36, 370–382.
See Also
Examples
data(dat.metap)
beckerp <- dat.metap$beckerp
invchisq(beckerp, 2) # same as sumlog
invchisq(c(0.999, 0.999, 0.001, 0.001), 4)
all.equal(exp(invchisq(beckerp, 2, log.p = TRUE)$p), invchisq(beckerp, 2)$p)