betagen function

The Generalised Beta Distribution

The Generalised Beta Distribution

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 ).

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)

Examples

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)

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

xbetagen(shape1,shape2,min,max,ncp)x betagen(shape1,shape2,min,max,ncp) x \sim betagen(shape1, shape2, min, max, ncp)x ~betagen(shape1, shape2, min, max, ncp)

if

xminmaxmin\simbeta(shape1,shape2,ncp)(xmin)/(maxmin) beta(shape1,shape2,ncp) \frac{x-min}{max-min}\simbeta(shape1,shape2,ncp)(x-min)/(max-min)~beta(shape1,shape2,ncp)

These functions use the Beta distribution functions after correct parameterization.

Returns

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

See Also

Beta

  • Maintainer: Regis Pouillot
  • License: GPL (>= 2)
  • Last published: 2024-06-05

Useful links