betagen: The Generalised Beta Distribution

Description Usage Arguments Details Value See Also Examples

Description

Density, distribution function, quantile function and random generation for the Beta distribution defined on the [min, max] domain with parameters shape1 and shape2 ( and optional non-centrality parameter ncp).

Usage

1
2
3
4
5
6
dbetagen(x, shape1, shape2, min=0, max=1, ncp=0, log=FALSE)
pbetagen(q, shape1, shape2, min=0, max=1, ncp=0, lower.tail=TRUE,
	  log.p=FALSE)
qbetagen(p, shape1, shape2, min=0, max=1, ncp=0, lower.tail=TRUE,
	  log.p=FALSE)
rbetagen(n, shape1, shape2, min=0, max=1, ncp=0)

Arguments

x,q

Vector of quantiles.

p

Vector of probabilities.

n

Number of observations. If length(n) > 1, the length is taken to be the number required.

shape1, shape2

Positive parameters of the Beta distribution.

min

Vector of minima.

max

Vector of maxima.

ncp

Non-centrality parameter of the Beta distribution.

log, log.p

Logical; if TRUE, probabilities p are given as log(p).

lower.tail

Logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x].

Details

x ~ betagen(shape1, shape2, min, max, ncp)

if

(x-min)/(max-min)~beta(shape1,shape2,ncp)

These functions use the Beta distribution functions after correct parametrisation.

Value

dbetagen gives the density, pbetagen gives the distribution function, qbetagen gives the quantile function, and rbetagen generates random deviates.

See Also

Beta

Examples

1
2
3
curve(dbetagen(x, shape1=3, shape2=5, min=1, max=6), from = 0, to = 7)
curve(dbetagen(x, shape1=1, shape2=1, min=2, max=5), from = 0, to = 7, lty=2, add=TRUE)
curve(dbetagen(x, shape1=.5, shape2=.5, min=0, max=7), from = 0, to = 7, lty=3, add=TRUE)


Search within the mc2d package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.