lik.ratio.test: Likelihood-ratio test

lik.ratio.testR Documentation

Likelihood-ratio test

Description

This function performs a likelihood-ratio test on fitted generalized hyperbolic distribution objects of class mle.ghyp.

Usage

lik.ratio.test(x, x.subclass, conf.level = 0.95)

Arguments

x

An object of class mle.ghyp.

x.subclass

An object of class mle.ghyp whose parameters form a subset of those of x.

conf.level

Confidence level of the test.

Details

The likelihood-ratio test can be used to check whether a special case of the generalized hyperbolic distribution is the “true” underlying distribution.

The likelihood-ratio is defined as

\Lambda = \frac{sup\{L(\theta | \mathbf{X}) : \theta \in \Theta_0\}} { sup\{L(\theta | \mathbf{X}) : \theta \in \Theta\}}.

Where L denotes the likelihood function with respect to the parameter \theta and data \mathbf{X}, and \Theta_0 is a subset of the parameter space \Theta. The null hypothesis H0 states that \theta \in \Theta_0. Under the null hypothesis and under certain regularity conditions it can be shown that -2 \log(\Lambda) is asymtotically chi-squared distributed with \nu degrees of freedom. \nu is the number of free parameters specified by \Theta minus the number of free parameters specified by \Theta_0.

The null hypothesis is rejected if -2 \log(\Lambda) exceeds the conf.level-quantile of the chi-squared distribution with \nu degrees of freedom.

Value

A list with components:

statistic

The value of the L-statistic.

p.value

The p-value for the test.

df

The degrees of freedom for the L-statistic.

H0

A boolean stating whether the null hypothesis is TRUE or FALSE.

Author(s)

David Luethi

References

Linear Statistical Inference and Its Applications by C. R. Rao
Wiley, New York, 1973

See Also

fit.ghypuv, logLik, AIC and stepAIC.ghyp.

Examples

  data(smi.stocks)

  sample <- smi.stocks[, "SMI"]

  t.symmetric <- fit.tuv(sample, silent = TRUE, symmetric = TRUE)
  t.asymmetric <- fit.tuv(sample, silent = TRUE)

  # Test symmetric Student-t against asymmetric Student-t in case
  # of SMI log-returns
  lik.ratio.test(t.asymmetric, t.symmetric, conf.level = 0.95)
  # -> keep the null hypothesis

  set.seed(1000)
  sample <- rghyp(1000, student.t(gamma = 0.1))

  t.symmetric <- fit.tuv(sample, silent = TRUE, symmetric = TRUE)
  t.asymmetric <- fit.tuv(sample, silent = TRUE)

  # Test symmetric Student-t against asymmetric Student-t in case of
  # data simulated according to a slightly skewed Student-t distribution
  lik.ratio.test(t.asymmetric, t.symmetric, conf.level = 0.95)
  # -> reject the null hypothesis

  t.symmetric <- fit.tuv(sample, silent = TRUE, symmetric = TRUE)
  ghyp.asymmetric <- fit.ghypuv(sample, silent = TRUE)

  # Test symmetric Student-t against asymmetric generalized
  # hyperbolic using the same data as in the example above
  lik.ratio.test(ghyp.asymmetric, t.symmetric, conf.level = 0.95)
  # -> keep the null hypothesis

ghyp documentation built on Sept. 12, 2024, 7:38 a.m.