This function performs a maximum likelihood parameter estimation for univariate generalized hyperbolic distributions.
fit.ghypuv(data, lambda = 1, alpha.bar = 0.5, mu = median(data),
sigma = mad(data), gamma = 0,
opt.pars = c(lambda = TRUE, alpha.bar = TRUE, mu = TRUE,
sigma = TRUE, gamma = !symmetric),
symmetric = FALSE, standardize = FALSE, save.data = TRUE,
na.rm = TRUE, silent = FALSE, ...)fit.hypuv(data,
opt.pars = c(alpha.bar = TRUE, mu = TRUE, sigma = TRUE, gamma = !symmetric),
symmetric = FALSE, ...)
fit.NIGuv(data,
opt.pars = c(alpha.bar = TRUE, mu = TRUE, sigma = TRUE, gamma = !symmetric),
symmetric = FALSE, ...)
fit.VGuv(data, lambda = 1,
opt.pars = c(lambda = TRUE, mu = TRUE, sigma = TRUE, gamma = !symmetric),
symmetric = FALSE, ...)
fit.tuv(data, nu = 3.5,
opt.pars = c(nu = TRUE, mu = TRUE, sigma = TRUE, gamma = !symmetric),
symmetric = FALSE, ...)
fit.gaussuv(data, na.rm = TRUE, save.data = TRUE)
An object of class mle.ghyp.
An object coercible to a vector.
Starting value for the shape parameter lambda.
Starting value for the shape parameter alpha.bar.
Starting value for the shape parameter nu (only used in case of a student-t distribution. It determines
the degree of freedom and is defined as -2*lambda.)
Starting value for the location parameter mu.
Starting value for the dispersion parameter sigma.
Starting value for the skewness parameter gamma.
A named logical vector which states which parameters should be fitted.
If TRUE the skewness parameter gamma keeps zero.
If TRUE the sample will be standardized before fitting.
Afterwards, the parameters and log-likelihood et cetera will be back-transformed.
If TRUE data will be stored within the
mle.ghyp object.
If TRUE missing values will be removed from data.
If TRUE no prompts will appear in the console.
Arguments passed to optim and to fit.ghypuv when
fitting special cases of the generalized hyperbolic distribution.
Wolfgang Breymann, David Luethi
The general-purpose optimization routine optim is used to
maximize the loglikelihood function. The default method is that of
Nelder and Mead which uses only function values. Parameters of
optim can be passed via the ... argument of the fitting
routines.
ghyp-package vignette in the doc folder or on https://cran.r-project.org/package=ghyp.
fit.ghypmv, fit.hypmv, fit.NIGmv,
fit.VGmv, fit.tmv for multivariate fitting routines.
ghyp.fit.info for information regarding the fitting procedure.
data(smi.stocks)
nig.fit <- fit.NIGuv(smi.stocks[,"SMI"], opt.pars = c(alpha.bar = FALSE),
alpha.bar = 1, control = list(abstol = 1e-8))
nig.fit
summary(nig.fit)
hist(nig.fit)
Run the code above in your browser using DataLab