Skip to contents

Beta distribution reparameterized by mode and concentration

Usage

rbeta2(n, omega, kappa)

dbeta2(x, omega, kappa)

Arguments

n

Number of samples.

omega

The mode of the beta distribution, constrained to (0, 1).

kappa

The concentration parameter of the beta distribution. Are only defined for values greater than 2.

x

Vector of quantiles.

Examples

rbeta2(n=5, omega=0.3, kappa=5)
#> [1] 0.10837749 0.44578219 0.02301638 0.37860768 0.54533124

# Plot beta distribution density
curve(dbeta2(x, omega=0.3, kappa=15), from=0, to=1)
curve(dbeta2(x, omega=0.3, kappa=5), from=0, to=1, col=2, add=TRUE)
abline(v=.3)