burr function

The Burr distribution

The Burr distribution

Density, distribution function, quantile function, raw moments and random generation for the Burr distribution, also known as the Burr Type XII distribution or the Singh-Maddala distribution.

dburr(x, shape1 = 2, shape2 = 1, scale = 0.5, log = FALSE) pburr(q, shape1 = 2, shape2 = 1, scale = 0.5, log.p = FALSE, lower.tail = TRUE) qburr(p, shape1 = 2, shape2 = 1, scale = 0.5, log.p = FALSE, lower.tail = TRUE) mburr( r = 0, truncation = 0, shape1 = 2, shape2 = 1, scale = 0.5, lower.tail = TRUE ) rburr(n, shape1 = 2, shape2 = 1, scale = 0.5)

Arguments

  • x, q: vector of quantiles
  • shape1, shape2, scale: Shape1, shape2 and scale of the Burr distribution, defaults to 2, 1 and 0.5.
  • log, log.p: logical; if TRUE, probabilities p are given as log(p).
  • lower.tail: logical; if TRUE (default), probabilities (moments) are P[Xx]P[X \le x] (E[xrXy])(E[x^r|X \le y]), otherwise, P[X>x]P[X > x] (E[xrX>y])(E[x^r|X > y])
  • p: vector of probabilities
  • r: rth raw moment of the distribution
  • truncation: lower truncation parameter
  • n: number of observations

Returns

dburr returns the density, pburr the distribution function, qburr the quantile function, mburr the rth moment of the distribution and rburr generates random deviates.

The length of the result is determined by n for rburr, and is the maximum of the lengths of the numerical arguments for the other functions.

Details

Probability and Cumulative Distribution Function:

f(x)=kcscale(ωscale)shape21(1+(ωscale)shape2)shape1+1,FX(x)=11(1+(ωscale)shape2)shape1 f(x) =\frac{\frac{kc}{scale}(\frac{\omega}{scale})^{shape2-1}}{(1+(\frac{\omega}{scale})^shape2)^{shape1+1}}, \qquad F_X(x) = 1-\frac{1}{(1+(\frac{\omega}{scale})^shape2)^shape1}

The y-bounded r-th raw moment of the Fréchet distribution equals:

scalershape1[B(rshape2+1,shape1rshape2)B((yscale)shape21+(yscale)shape2;rshape2+1,shape1rshape2)],shape2>r,kc>r scale^{r} shape1 [\boldsymbol{B}(\frac{r}{shape2} +1,shape1-\frac{r}{shape2}) - \boldsymbol{B}(\frac{(\frac{y}{scale})^{shape2}}{1+(\frac{y}{scale})^{shape2}};\frac{r}{shape2} +1,shape1-\frac{r}{shape2})], \qquad shape2>r, kc>r

Examples

## Burr density plot(x = seq(0, 5, length.out = 100), y = dburr(x = seq(0, 5, length.out = 100))) plot(x = seq(0, 5, length.out = 100), y = dburr(x = seq(0, 5, length.out = 100), shape2 = 3)) ## Demonstration of log functionality for probability and quantile function qburr(pburr(2, log.p = TRUE), log.p = TRUE) ## The zeroth truncated moment is equivalent to the probability function pburr(2) mburr(truncation = 2) ## The (truncated) first moment is equivalent to the mean of a #(truncated) random sample, for large enough samples. x <- rburr(1e5, shape2 = 3) mean(x) mburr(r = 1, shape2 = 3, lower.tail = FALSE) sum(x[x > quantile(x, 0.1)]) / length(x) mburr(r = 1, shape2 = 3, truncation = quantile(x, 0.1), lower.tail = FALSE)
  • Maintainer: Ruben Dewitte
  • License: GPL-3
  • Last published: 2020-05-25

Useful links