Learn R Programming

brr (version 1.0.0)

Beta2Dist: Beta distribution of the second kind

Description

Density, distribution function, quantile function and random generation for the Beta distribution of the second kind with shape parameters c and d and scale parameter scale.

Usage

dbeta2(x, c, d, scale, log = FALSE, ...)
pbeta2(q, c, d, scale, ...)
qbeta2(p, c, d, scale, ...)
rbeta2(n, c, d, scale)
summary_beta2(c, d, scale, output = "list", ...)

Arguments

x,q
vector of quantiles
c,d
non-negative shape parameters
scale
non-negative scale parameter
log
logical; if true, returns the logarithm of the result
...
other arguments passed to FDist
p
vector of probabilities
n
number of observations to be simulated
output
type of the summary_beta2 output: "list" to return a list, "pandoc" to print a table

Value

dbeta2 gives the density, pbeta2 the distribution function, qbeta2 the quantile function, and rbeta2 generates random observations, and summary_beta2 returns a summary of the distribution.

Details

The Beta distribution of the second kind with shape parameters $c>0$ and $d>0$ and scale parameter $k>0$ is the distribution of $k*(U/(1-U))$ where $U$ is a random variable following the Beta distribution with shape parameters $c$ and $d$.

Examples

Run this code
curve(dbeta2(x, 3, 10, scale=2), from=0, to=3)
u <- rbeta(1e5, 3, 10)
lines(density(2*u/(1-u)), col="blue", lty="dashed")
summary_beta2(3,10,2)

Run the code above in your browser using DataLab