dFTG: FTG Density Function

Description Usage Arguments Value References Examples

View source: R/FTG-density.R

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; α, θ, ρ) = \frac{ρ^{α}}{σ}≤ft(ρ + \frac{x}{σ}\right)^{α - 1}\exp≤ft(-≤ft(ρ + \frac{x}{σ}\right)\right)/Γ(α, ρ).

Usage

1
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

1
2
3
4
5
6
7
8
9
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")

SergiVilardell/distributionTails documentation built on Jan. 17, 2021, 8:44 a.m.