TransformedBeta: The Transformed Beta Distribution

TransformedBetaR Documentation

The Transformed Beta Distribution

Description

Density function, distribution function, quantile function, random generation, raw moments and limited moments for the Transformed Beta distribution with parameters shape1, shape2, shape3 and scale.

Usage

dtrbeta(x, shape1, shape2, shape3, rate = 1, scale = 1/rate,
        log = FALSE)
ptrbeta(q, shape1, shape2, shape3, rate = 1, scale = 1/rate,
        lower.tail = TRUE, log.p = FALSE)
qtrbeta(p, shape1, shape2, shape3, rate = 1, scale = 1/rate,
        lower.tail = TRUE, log.p = FALSE)
rtrbeta(n, shape1, shape2, shape3, rate = 1, scale = 1/rate)
mtrbeta(order, shape1, shape2, shape3, rate = 1, scale = 1/rate)
levtrbeta(limit, shape1, shape2, shape3, rate = 1, scale = 1/rate,
          order = 1)

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, shape3, scale

parameters. Must be strictly positive.

rate

an alternative way to specify the scale.

log, log.p

logical; if TRUE, probabilities/densities p are returned as \log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X \le x], otherwise, P[X > x].

order

order of the moment.

limit

limit of the loss variable.

Details

The transformed beta distribution with parameters shape1 = \alpha, shape2 = \gamma, shape3 = \tau and scale = \theta, has density:

f(x) = \frac{\Gamma(\alpha + \tau)}{\Gamma(\alpha)\Gamma(\tau)} \frac{\gamma (x/\theta)^{\gamma \tau}}{% x [1 + (x/\theta)^\gamma]^{\alpha + \tau}}

for x > 0, \alpha > 0, \gamma > 0, \tau > 0 and \theta > 0. (Here \Gamma(\alpha) is the function implemented by R's gamma() and defined in its help.)

The transformed beta is the distribution of the random variable

\theta \left(\frac{X}{1 - X}\right)^{1/\gamma},

where X has a beta distribution with parameters \tau and \alpha.

The transformed beta distribution defines a family of distributions with the following special cases:

  • A Burr distribution when shape3 == 1;

  • A loglogistic distribution when shape1 == shape3 == 1;

  • A paralogistic distribution when shape3 == 1 and shape2 == shape1;

  • A generalized Pareto distribution when shape2 == 1;

  • A Pareto distribution when shape2 == shape3 == 1;

  • An inverse Burr distribution when shape1 == 1;

  • An inverse Pareto distribution when shape2 == shape1 == 1;

  • An inverse paralogistic distribution when shape1 == 1 and shape3 == shape2.

The kth raw moment of the random variable X is E[X^k], -\tau\gamma < k < \alpha\gamma.

The kth limited moment at some limit d is E[\min(X, d)^k], k > -\tau\gamma and \alpha - k/\gamma not a negative integer.

Value

dtrbeta gives the density, ptrbeta gives the distribution function, qtrbeta gives the quantile function, rtrbeta generates random deviates, mtrbeta gives the kth raw moment, and levtrbeta gives the kth moment of the limited loss variable.

Invalid arguments will result in return value NaN, with a warning.

Note

levtrbeta computes the limited expected value using betaint.

Distribution also known as the Generalized Beta of the Second Kind and Pearson Type VI. See also Kleiber and Kotz (2003) for alternative names and parametrizations.

The "distributions" package vignette provides the interrelations between the continuous size distributions in actuar and the complete formulas underlying the above functions.

Author(s)

Vincent Goulet vincent.goulet@act.ulaval.ca and Mathieu Pigeon

References

Kleiber, C. and Kotz, S. (2003), Statistical Size Distributions in Economics and Actuarial Sciences, Wiley.

Klugman, S. A., Panjer, H. H. and Willmot, G. E. (2012), Loss Models, From Data to Decisions, Fourth Edition, Wiley.

See Also

dfpareto for an equivalent distribution with a location parameter.

Examples

exp(dtrbeta(2, 2, 3, 4, 5, log = TRUE))
p <- (1:10)/10
ptrbeta(qtrbeta(p, 2, 3, 4, 5), 2, 3, 4, 5)
qpearson6(0.3, 2, 3, 4, 5, lower.tail = FALSE)

## variance
mtrbeta(2, 2, 3, 4, 5) - mtrbeta(1, 2, 3, 4, 5)^2

## case with shape1 - order/shape2 > 0
levtrbeta(10, 2, 3, 4, scale = 1, order = 2)

## case with shape1 - order/shape2 < 0
levtrbeta(10, 1/3, 0.75, 4, scale = 0.5, order = 2)

actuar documentation built on Nov. 8, 2023, 9:06 a.m.