powered by
pbeta()
Computes the normalized incomplete beta function, in pure R code, derived from Nico Temme's Maple code for computing Table 1 in Gil et al (2023).
It uses a continued fraction, similarly to bfrac() in the TOMS 708 algorithm underlying R's pbeta().
bfrac()
Ixpq(x, l_x, p, q, tol = 3e-16, it.max = 100L, plotIt = FALSE)
a vector like x or l_x with corresponding
x
l_x
pbeta(x, *) values.
pbeta(x, *)
numeric
1 - x; may be specified with higher precision (e.g., when \(x \approx 1\), \(1-x\) suffers from cancellation).
1 - x
the two shape parameters of the beta distribution.
positive number, the convergence tolerance for the continued fraction computation.
maximal number of continued fraction steps.
a logical, if true, plots show the relative approximation errors in each step.
logical
Martin Maechler; based on original Maple code by Nico Temme.
Gil et al. (2023)
pbeta, pbetaRv1(), ..
pbeta
pbetaRv1()
x <- seq(0, 1, by=1/16) r <- Ixpq(x, 1-x, p = 4, q = 7, plotIt = TRUE) cbind(x, r) ## and "test" ___FIXME__
Run the code above in your browser using DataLab