Description Usage Arguments Details Value Author(s) Examples
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
1 2 |
alpha |
Test size; required tail area for central chi squared distribution. |
beta |
Test power; required tail area for non-central chi squared distribution. |
df |
Degrees of freedom for both chi squared distributions. |
ncp |
Non-centrality parameter |
See the examples.
chi2ncp
returns the non-centrality parameter (ncp
) for
given alpha
and beta
. chi2power
returns the
power (beta
) for given alpha
and ncp
.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4 5 6 7 8 | ## NCP needed to have 0.80 power for a 0.05 size test
chi2ncp(.05, .8)
## NCP needed to have 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)
chi2power(5e-08, ncp = chi2ncp(5e-08, .8))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.