qbetaAppr {DPQ} | R Documentation |
Compute quantiles (inverse distribution values) for the beta distribution, using diverse approximations.
qbetaAppr.1(a, p, q, y = qnormUappr(a)) qbetaAppr.2(a, p, q, lower.tail=TRUE, log.p=FALSE, logbeta = lbeta(p,q)) qbetaAppr.3(a, p, q, lower.tail=TRUE, log.p=FALSE, logbeta = lbeta(p,q)) qbetaAppr.4(a, p, q, y = qnormUappr(a), verbose = getOption("verbose")) qbetaAppr (a, p, q, y = qnormUappr(a), logbeta= lbeta(p,q), verbose = getOption("verbose") && length(a) == 1) qbeta.R (alpha, p, q, lower.tail = TRUE, log.p = FALSE, logbeta = lbeta(p,q), low.bnd = 3e-308, up.bnd = 1-2.22e-16, method = c("AS109", "Newton-log"), tol.outer = 1e-15, f.acu = function(a,p,q) max(1e-300, 10^(-13- 2.5/pp^2 - .5/a^2)), fpu = .Machine$ double.xmin, qnormU.fun = function(u, lu) qnormUappr(p=u, lp=lu) , R.pre.2014 = FALSE , verbose = getOption("verbose") , non.finite.report = verbose )
a, alpha |
vector of probabilities (otherwise, e.g., in
|
p, q |
the two shape parameters of the beta distribution; otherwise, e.g., in
|
y |
an approximation to Φ^{-1}(1-α) (aka
z_{1-α}) where Φ(x) is the standard normal
cumulative probability function and Φ{-1}(x) its inverse,
i.e., R's |
lower.tail, log.p |
logical, see, e.g., |
logbeta |
must be |
verbose |
logical or integer indicating if and how much “monitoring” information should be produced by the algorithm. |
low.bnd, up.bnd |
lower and upper bounds for ...TODO... |
method |
a string specifying the approximation method to be used. |
tol.outer |
the “outer loop” convergence tolerance; the
default |
f.acu |
a |
fpu |
a very small positive number. |
qnormU.fun |
a |
R.pre.2014 |
a |
non.finite.report |
|
...
The R Core Team for the C version in R's sources; Martin Maechler for the R port.
qbeta.R(0.6, 2, 3) # 0.4445 qbeta.R(0.6, 2, 3) - qbeta(0.6, 2,3) # almost 0 qbetaRV <- Vectorize(qbeta.R, "alpha") # now can use curve(qbetaRV(x, 1.5, 2.5)) curve(qbeta (x, 1.5, 2.5), add=TRUE, lwd = 3, col = adjustcolor("red", 1/2)) ## an example of disagreement (and doubt, as borderline, close to underflow): qbeta.R(0.5078, .01, 5) # -> 2.77558e-15 # but qbeta (0.5078, .01, 5) # -> 1.776357e-15 now gives 4.651188e-31 !!! qbeta (0.5078, .01, 5, ncp=0) # also gives 4.651188e-31