bpser | R Documentation |
pbeta()
'bpser' series computationCompute the bpser
series approximation of pbeta
, the
incomplete beta function.
Note that when b
is integer valued, the series is a sum of
b+1
terms.
bpser(a, b, x, log.p = FALSE, eps = 1e-15, verbose = FALSE, warn = TRUE)
a , b |
numeric and non-negative, the two shape parameters of the beta distribution. |
x |
numeric vector of abscissa values in |
log.p |
a |
eps |
series convergence (and other) tolerance, a small positive number. |
verbose |
a |
warn |
a |
a list
with components
r |
the resulting |
ier |
an integer vector of the same length as |
Martin Maechler, ported to DPQ; R-Core team for the code in R.
TOMS 708, see pbeta
R's pbeta
;
DPQ's pbetaRv1()
, and Ixpq()
;
Rmpfr's pbetaI
with(bpser(100000, 11, (0:64)/64), # all 0 {last one "wrongly"}
stopifnot(r == c(rep(0, 64), 1), err == 0))
bp1e5.11L <- bpser(100000, 11, (0:64)/64, log.p=TRUE)# -> 2 "underflow to -Inf" warnings!
pbe <- pbeta((0:64)/64, 100000, 11, log.p=TRUE)
## verbose=TRUE showing info on number of terms / iterations
ps11.5 <- bpser(100000, 11.5, (0:64)/64, log.p=TRUE, verbose=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.