| beta2 | R Documentation |
Density, distribution function, quantile function, and random generation for the beta distribution reparameterised in terms of mean and concentration.
dbeta(x, shape1, shape2, log = FALSE, eps = 0)
dbeta2(x, mu, phi, log = FALSE, eps = 0)
pbeta2(q, mu, phi, lower.tail = TRUE, log.p = FALSE)
qbeta2(p, mu, phi, lower.tail = TRUE, log.p = FALSE)
rbeta2(n, mu, phi)
x, q |
vector of quantiles |
shape1, shape2 |
non-negative parameters |
log, log.p |
logical; if |
eps |
for internal use only, don't change. |
mu |
mean parameter, must be in the interval from 0 to 1. |
phi |
concentration parameter, must be positive. |
lower.tail |
logical; if |
p |
vector of probabilities |
n |
number of random values to return. |
This implementation allows for automatic differentiation with RTMB.
Currently, dbeta masks RTMB::dbeta because the latter has a numerically unstable gradient.
dbeta2 gives the density, pbeta2 gives the distribution function, qbeta2 gives the quantile function, and rbeta2 generates random deviates.
set.seed(123)
x <- rbeta2(1, 0.5, 1)
d <- dbeta2(x, 0.5, 1)
p <- pbeta2(x, 0.5, 1)
q <- qbeta2(p, 0.5, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.