GeneralizedBeta {actuar}R Documentation

The Generalized Beta Distribution

Description

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

Usage

dgenbeta(x, shape1, shape2, shape3, rate = 1, scale = 1/rate,
         log = FALSE)
pgenbeta(q, shape1, shape2, shape3, rate = 1, scale = 1/rate,
         lower.tail = TRUE, log.p = FALSE)
qgenbeta(p, shape1, shape2, shape3, rate = 1, scale = 1/rate,
         lower.tail = TRUE, log.p = FALSE)
rgenbeta(n, shape1, shape2, shape3, rate = 1, scale = 1/rate)
mgenbeta(order, shape1, shape2, shape3, rate = 1, scale = 1/rate)
levgenbeta(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 pp are returned as log(p)\log(p).

lower.tail

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

order

order of the moment.

limit

limit of the loss variable.

Details

The generalized beta distribution with parameters shape1 =α= \alpha, shape2 =β= \beta, shape3 =τ= \tau and scale =θ= \theta, has density:

f(x)=Γ(α+β)Γ(α)Γ(β)(x/θ)ατ(1(x/θ)τ)β1τxf(x) = \frac{\Gamma(\alpha + \beta)}{\Gamma(\alpha)\Gamma(\beta)} (x/\theta)^{\alpha \tau} (1 - (x/\theta)^\tau)^{\beta - 1} \frac{\tau}{x}

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

The generalized beta is the distribution of the random variable

θX1/τ,\theta X^{1/\tau},

where XX has a beta distribution with parameters α\alpha and β\beta.

The kkth raw moment of the random variable XX is E[Xk]E[X^k] and the kkth limited moment at some limit dd is E[min(X,d)]E[\min(X, d)], k>ατk > -\alpha\tau.

Value

dgenbeta gives the density, pgenbeta gives the distribution function, qgenbeta gives the quantile function, rgenbeta generates random deviates, mgenbeta gives the kkth raw moment, and levgenbeta gives the kkth moment of the limited loss variable.

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

Note

This is not the generalized three-parameter beta distribution defined on page 251 of Johnson et al, 1995.

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

References

Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) Continuous Univariate Distributions, Volume 2, Wiley.

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

Examples

exp(dgenbeta(2, 2, 3, 4, 0.2, log = TRUE))
p <- (1:10)/10
pgenbeta(qgenbeta(p, 2, 3, 4, 0.2), 2, 3, 4, 0.2)
mgenbeta(2, 1, 2, 3, 0.25) - mgenbeta(1, 1, 2, 3, 0.25) ^ 2
levgenbeta(10, 1, 2, 3, 0.25, order = 2)

[Package actuar version 3.3-4 Index]