invchisq: Combine p values using inverse chi squared method

View source: R/invchisq.R

invchisqR Documentation

Combine p values using inverse chi squared method

Description

Combine \mjseqnp-values by the inverse chi-squared method, also known as Lancaster's method\loadmathjax

Usage

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

Arguments

p \sigvec
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 \mjseqnp-values

na.action

A function indicating what should happen when data contains NAs

log.p \logp
x

An object of class ‘invchisq

...

Other arguments to be passed through

Details

Defined as \mjdeqn\sum_i=1^n \chi^2_k_i(p_i) > \chi^2_\sumk_i(\alpha)\sum \chi^2_k(p) > \chi^2_\sumk(\alpha)

If k is a single value it is used for all the p of which there are n. If any value of \mjseqnk_i\le0 then the corresponding \mjseqnp_i is not included.

\ltle

two

\plotmethod \nocancel

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

\insertRef

becker94metap

\insertRef

lancaster49metap

See Also

See also sumlog and plotp

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)

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