stepAIC.ghyp: Perform a model selection based on the AIC

Description Usage Arguments Value Author(s) See Also Examples

Description

This function performs a model selection in the scope of the generalized hyperbolic distribution class based on the Akaike information criterion. stepAIC.ghyp can be used for the univariate as well as for the multivariate case.

Usage

1
2
stepAIC.ghyp(data, dist = c("ghyp", "hyp", "NIG", "VG", "t", "gauss"),
             symmetric = NULL, ...)

Arguments

data

A vector, matrix or data.frame.

dist

A character vector of distributions from where the best fit will be identified.

symmetric

Either NULL, TRUE or FALSE. NULL means that both symmetric and asymmetric models will be fitted. For symmetric models select TRUE and for asymmetric models select FALSE.

...

Arguments passed to fit.ghypuv or fit.ghypmv.

Value

A list with components:

best.model

The model minimizing the AIC.

all.models

All fitted models.

fit.table

A data.frame with columns model, symmetric, lambda, alpha.bar, aic, llh (log-Likelihood), converged, n.iter (number of iterations) sorted according to the aic. In the univariate case three additional columns containing the parameters mu, sigma and gamma are added.

Author(s)

David Luethi

See Also

lik.ratio.test, fit.ghypuv and fit.ghypmv.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  data(indices)

  # Multivariate case:
  aic.mv <- stepAIC.ghyp(indices, dist = c("ghyp", "hyp", "t", "gauss"),
                         symmetric = NULL, control = list(maxit = 500),
                         silent = TRUE, nit = 500)

  summary(aic.mv$best.model)

  # Univariate case:
  aic.uv <- stepAIC.ghyp(indices[, "stock"], dist = c("ghyp", "NIG", "VG", "gauss"),
                         symmetric = TRUE, control = list(maxit = 500), silent = TRUE)


  # Test whether the ghyp-model provides a significant improvement with
  # respect to the VG-model:
  lik.ratio.test(aic.uv$all.models[[1]], aic.uv$all.models[[3]])

ghyp documentation built on May 2, 2019, 6:09 p.m.