Density, distribution function, quantile function, random generation and fitting from the univariate distributions implemented in the rugarch package, with functions for skewness and excess kurtosis given density skew and shape parameters.
rgarchdist | rugarch univariate distributions, |
fitdist | MLE parameter fit for the rugarch univariate distributions, |
ddist(distribution = "norm", y, mu = 0, sigma = 1, lambda = -0.5, skew = 1,
shape = 5)
pdist(distribution = "norm", q, mu = 0, sigma = 1, lambda = -0.5, skew = 1,
shape = 5)
qdist(distribution = "norm", p, mu = 0, sigma = 1, lambda = -0.5, skew = 1,
shape = 5)
rdist(distribution = "norm", n, mu = 0, sigma = 1, lambda = -0.5, skew = 1,
shape = 5)
fitdist(distribution = "norm", x, control=list())
dskewness(distribution = "norm", skew = 1, shape = 5, lambda = -0.5)
dkurtosis(distribution = "norm", skew = 1, shape = 5, lambda = -0.5)
distplot(distribution = "snorm", skewbounds = NULL, shapebounds = NULL,
n.points = NULL)
skdomain(distribution = "nig", kurt.max = 30, n.points = 25, lambda = 1,
plot = TRUE, legend = NULL)
d*
returns the density,
p*
returns the distribution function,
q*
returns the quantile function, and
r*
generates random deviates,
all values are numeric vectors.
fitdist
returns a list with the following components:
The best set of parameters found.
The likelihood values of the optimization (vector whose length represents the number of major iterations).
An integer code. 0 indicates successful convergence.
The lagrange multiplier value at convergence.
The hessian at the solution.
The value of the inequality constraint multiplier (NULL for the distribution fit problems).
dskewness
returns the skewness of the distribution.
dkurtosis
returns the excess kurtosis of the distribution.
skdomain
returns the authorized domain of the distribution.
The distribution name. Valid choices are “norm”, “snorm”, “std”, “sstd”, “ged”, “sged”, “nig”, “jsu”.
location, scale and skewness and shape parameters (see details).
The additional shape parameter for the Generalized Hyperbolic and NIG distributions.
The number of observations.
A numeric vector of probabilities.
A numeric vector of quantiles.
A univariate dataset (for fitting routine).
Control parameters passed to the solnp
solver.
The skewed distribution skew bounds for the plot. Leaving it NULL will use a good set of defaults for display purposes.
The shaped distribution shape bounds for the plot. Leaving it NULL will use a good set of defaults for display purposes.
The number of points between the lower and upper bounds of the skew and shape parameters for which to evaluate the skewness and excess kurtosis. For the skdomain function this determines the kurtosis interval (3-max.kurt) for which to determine (using a solver) the maximum skewness.
The maximum kurtosis for which to determine the bounds for the skewness-kurtosis domain.
Whether to plot the results.
Whether to include a legend with the plot in the skdomain.
Diethelm Wuertz for the Rmetrics R-port of the “norm”, “snorm”,
“std”, “sstd”, “ged”, “sged” and “nig”
distrbutions.
Rigby, R. A. and Stasinopoulos D. M for the JSU distribution in the
gamlss
package.
Alexios Ghalanos for rugarch implementation and higher moment distribution
functions.
For the “nig” and “ghyp” distributions, the shape, skew and lambda
are transformed from the ‘zeta-rho’ to the ‘alpha-beta’
parametrization and then scaled by the mean and standard deviation. The fitting
routines use the solnp
solver and minimize the negative of the
log-likelihood.
The “dskewness” and “dkurtosis” functions take as inputs the
distribution name, skew and shape parameters and return the skewneness and
excess kurtosis of the distribution. The functions are not at present
vectorized.
The distplot provides illustrative plots (or surfaces) of skewness and kurtosis
for any of the distributions supported (with the exception of the GH which has
2 shape and 1 skew parameters and hence is impractical to represent).
Johnson, N. L. 1954, Systems of frequency curves derived from the first law of
Laplace, Trabajos de Estadistica, 5, 283--291.
Barndorff-Nielsen, O. E. 1995, Normal inverse Gaussian processes and the
modeling of stock returns, mimeo: Univ.of Aarhus Denmark.
Fernandez C. and Steel, M.F.J. 1998, On Bayesian Modelling of Fat Tails and
Skewness, Journal of the American Statistical Association, 359--371.