dist_gk | R Documentation |
The g-and-k distribution is a flexible distribution often used to model univariate data. It is particularly known for its ability to handle skewness and heavy-tailed behavior.
dist_gk(A, B, g, k, c = 0.8)
A |
Vector of A (location) parameters. |
B |
Vector of B (scale) parameters. Must be positive. |
g |
Vector of g parameters. |
k |
Vector of k parameters. Must be at least -0.5. |
c |
Vector of c parameters. Often fixed at 0.8 which is the default. |
We recommend reading this documentation on https://pkg.mitchelloharawild.com/distributional/, where the math will render nicely.
In the following, let X
be a g-k random variable with parameters
A
, B
, g
, k
, and c
.
Support: (-\infty, \infty)
Mean: Not available in closed form.
Variance: Not available in closed form.
Probability density function (p.d.f):
The g-k distribution does not have a closed-form expression for its density. Instead, it is defined through its quantile function:
Q(u) = A + B \left( 1 + c \frac{1 - \exp(-gz(u))}{1 + \exp(-gz(u))} \right) (1 + z(u)^2)^k z(u)
where z(u) = \Phi^{-1}(u)
, the standard normal quantile of u.
Cumulative distribution function (c.d.f):
The cumulative distribution function is typically evaluated numerically due to the lack of a closed-form expression.
gk::dgk, dist_gh
dist <- dist_gk(A = 0, B = 1, g = 0, k = 0.5)
dist
mean(dist)
variance(dist)
support(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.