dFTG {distTails}R Documentation

FTG Density Function

Description

This function computes the density of the full-tail gamma with the input sample data. The expression for the density used is:

g(x; \alpha, \theta, \rho) = \frac{\rho^{\alpha}}{\sigma}\left(\rho + \frac{x}{\sigma}\right)^{\alpha - 1}\exp\left(-\left(\rho + \frac{x}{\sigma}\right)\right)/\Gamma(\alpha, \rho).

Usage

dFTG(x, threshold, scale, shape)

Arguments

x

Sample data.

threshold

Minimum value of the tail.

scale

Scale parameter.

shape

Shape parameter.

Value

Gives the density of the FTG. The length of the result is determined by the length of x.

References

del Castillo, Joan & Daoudi, Jalila & Serra, Isabel. (2012). The full-tails gamma distribution applied to model extreme values. ASTIN Bulletin. <doi:10.1017/asb.2017.9>.

Examples

a <- 0.3
t <- 0.3
r <- 0.8
n <- 1000
sample <- rFTG(n, a, t, r)
x <- seq(min(sample), max(sample), length.out = 200)
d <- dFTG(x, a, t, r)
hist(sample, breaks = "FD", probability = TRUE)
lines(x, d, col = "red")

[Package distTails version 0.1.2 Index]