dist-gat: Generalized Asymmetric t Distribution

Description Usage Arguments Value Author(s) References Examples

Description

Functions to compute density, distribution function, quantile function and to generate random variates for the generalized asymmetric t distribution (GAt). Notice that this is the same t3-distribution mentioned in the literature and defined by Paolella (1997) and Mittnik and Paolella (2000). The GAt distribution includes the Student's t, Laplace, Cauchy and the normal distribution when the shape parameter (ν \rightarrow ∞) (see Mittnik and Paolella (2000)).

Usage

1
2
3
4
dgat(x, mean = 0, sd = 1, nu = 2, d = 3, xi = 1, log = FALSE)
pgat(q, mean = 0, sd = 1, nu = 2, d = 3, xi = 1)
qgat(p, mean = 0, sd = 1, nu = 2, d = 3, xi = 1)
rgat(n, mean = 0, sd = 1, nu = 2, d = 3, xi = 1)

Arguments

mean, sd, d, nu, xi

location parameter mean, scale parameter sd, shape 1 parameter nu, shape 2 parameter d, asymmetry parameter xi.

n

the number of observations.

p

a numeric vector of probabilities.

x, q

a numeric vector of quantiles.

log

a logical; if TRUE, densities are given as log densities.

Value

d* returns the density, p* returns the distribution function, q* returns the quantile function, and r* generates random deviates,
all values are numeric vectors.

Author(s)

Thiago do Rego Sousa

References

Mittnik, S., Paolella, M.S. (2000). Prediction of Financial Downside-Risk with Heavy-Tailed Conditional Distributions Available at SSRN 391261.

Paolella, M. (1997). Tail Estimation and Conditional Modeling of Heteroskedstic Time-Series. Ph.D Thesis, Institute of Statistics and Econometrics, Christian Albrechts University of Kiel.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Simulate Random Values and compare with
# the empirical density and probability functions
# Note: This example was addapted from "sstd {fGarch} R Documentation"

# Configure plot and generate random values
par(mfrow = c(2, 2))
set.seed(1000)
r = rgat(n = 1000)
plot(r, type = "l", main = "GAt Random Values", col = "steelblue")

# Plot empirical density and compare with true density:
hist(r, n = 25, probability = TRUE, border = "white", col = "steelblue")
box()
x = seq(min(r), max(r), length = 201)
lines(x, dgat(x), lwd = 2)

# Plot density function and compare with true df:
plot(sort(r), (1:1000/1000), main = "Probability", col = "steelblue",
     ylab = "Probability")
lines(x, pgat(x), lwd = 2)

# Compute quantiles:
# Here we compute the quantiles corresponding to the probability points from 
# -10 to 10 and expect to obtain the same input sequence
round(qgat(pgat(q = seq(-10, 10, by = 0.5))), digits = 6)

GEVStableGarch documentation built on May 2, 2019, 5:53 a.m.