ncp: Compute non-centrality parameter of chi squared distribution.

Description Usage Arguments Details Value Author(s) Examples

Description

Computes the non-centrality parameter of chi squared distribution for specified alpha and beta, such that there is probability (power) beta of exceeding the critical value for probability (size) alpha for a central chi squared distribution

Usage

1
chi2ncp(alpha, beta, df = 1)

Arguments

alpha

Required tail area for central chi squared distribution.

beta

Required tail area for non-central chi squared distribution.

df

Degrees of freedom for both chi squared distributions.

Details

See the examples.

Value

The non-centrality parameter.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

1
2
3
4
5
6
7
## 0.80 power for 0.05 size test
chi2ncp(.05, .8)
## 0.80 power for genome-wide significance
chi2ncp(5e-08, .8)
## test
critval <- qchisq(5e-08, lower.tail = FALSE, df = 1)
pchisq(critval, ncp = chi2ncp(5e-08, .8), lower.tail = FALSE, df = 1)

gtx documentation built on May 19, 2017, 3:57 p.m.

Search within the gtx package
Search all R packages, documentation and source code