Numeric value of Owen's Q-function at given input arguments.
Warning
Since for really large values of nu and the upper integration limit b the integrand is a function which is zero over nearly all its range, the
integrate() function may fail (see ?integrate) and
OwensQ() then returns erroneously 0.
The function now tries to return a value via non-central t-approximation in
such cases. This approximation is up to 6 decimals correct as far as tested.
OwensQ() issues a warning if the nct-approximation is used.
Details
Uses integrate() from package stats to perform the numerical evaluation
of the definite integral in Owen's Q function.
See ../doc/BE_power_sample_size_excerpt.pdf in the package sub-directory
/doc for the definition of Owen's Q and implmentation details.
In case of high delta and/or high upper integration limit b where the
implementation via R's function integrate() may fail the function
OwensQOwen() is used.
The arguments to the function must be scalars. No vectors allowed.
References
Owen, D. B. (1965)
"A Special Case of a Bivariate Non-central t-Distribution"
Biometrika, 52, 437-446.
# This function is mainly intended for internal use.OwensQ(10,2.5,5,0,2)
#should give [1] 9.388137e-06 OwensQ(10,-2.5,-5,0,2)
#should give [1] 0.05264363