pnchisqWienergerm {DPQ}  R Documentation 
Wienergerm Approximations to (NonCentral) Chisquared Probabilities
Description
Functions implementing the two Wiener germ approximations to
pchisq()
, the (noncentral) chisquared distribution, and to
qchisq()
its inverse, the quantile function.
These have been proposed by Penev and Raykov (2000) who also listed a Fortran implementation.
In order to use them in numeric boundary cases, Martin Maechler has improved the original formulas.
Auxiliary functions:
sW()
:The
s()
as in the Wienergerm approximation, but using Taylor expansion when needed, i.e.,(x*ncp / df^2) << 1
.qs()
:...
z0()
:...
z.f()
:...
z.s()
:...
.................. ..................
Usage
pchisqW. (q, df, ncp = 0, lower.tail = TRUE, log.p = FALSE,
Fortran = TRUE, variant = c("s", "f"))
pchisqV (q, df, ncp = 0, lower.tail = TRUE, log.p = FALSE,
Fortran = TRUE, variant = c("s", "f"))
pchisqW (q, df, ncp = 0, lower.tail = TRUE, log.p = FALSE, variant = c("s", "f"))
pchisqW.R(x, df, ncp = 0, lower.tail = TRUE, log.p = FALSE, variant = c("s", "f"),
verbose = getOption("verbose"))
sW(x, df, ncp)
qs(x, df, ncp, f.s = sW(x, df, ncp), eps1 = 1/2, sMax = 1e+100)
z0(x, df, ncp)
z.f(x, df, ncp)
z.s(x, df, ncp, verbose = getOption("verbose"))
Arguments
q , x 
vector of quantiles (main argument, see 
df 
degrees of freedom (nonnegative, but can be noninteger). 
ncp 
noncentrality parameter (nonnegative). 
lower.tail , log.p 

variant 
a 
Fortran 
logical specifying if the Fortran or the C version should be used. 
verbose 
logical (or integer) indicating if or how much diagnostic output should be printed to the console during the computations. 
f.s 
a number must be a “version” of 
eps1 
for 
sMax 
for 
Details
....TODO... or write vignette
Value
all these functions return numeric
vectors according to
their arguments.
Note
The exact auxiliary function names etc, are still considered provisional; currently they are exported for easier documentation and use, but may well all disappear from the exported functions or even completely.
Author(s)
Martin Maechler, mostly end of Jan 2004
References
Penev, Spiridon and Raykov, Tenko (2000) A Wiener Germ approximation of the noncentral chi square distribution and of its quantiles. Computational Statistics 15, 219–228. doi:10.1007/s001800000029
Dinges, H. (1989) Special cases of second order Wiener germ approximations. Probability Theory and Related Fields, 83, 5–57.
See Also
pchisq
, and other approximations for it:
pnchisq()
etc.
Examples
## see example(pnchisqAppr) which looks at all of the pchisq() approximating functions