lik.ratio.test | R Documentation |
This function performs a likelihood-ratio test on fitted generalized
hyperbolic distribution objects of class mle.ghyp
.
lik.ratio.test(x, x.subclass, conf.level = 0.95)
x |
An object of class |
x.subclass |
An object of class |
conf.level |
Confidence level of the test. |
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.
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 |
David Luethi
Linear Statistical Inference and Its Applications by C. R. Rao
Wiley, New York, 1973
fit.ghypuv
, logLik
, AIC
and
stepAIC.ghyp
.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.