Learn R Programming

rugarch (version 1.0-16)

GMMTest: The GMM Orthogonality Test of Hansen

Description

Implements the GMM Orthogonality Test of Hansen.

Usage

GMMTest(z, lags = 1, skew=0, kurt=3, conf.level = 0.95)

Arguments

z
A numeric vector the standardized residuals.
lags
The number of lags to test for.
skew
The skewness of the standardized residuals (derived from the estimated model). This can be either a scalar or numeric vector the same size as z.
kurt
The kurtosis (not excess) of the standardized residuals (derived from the estimated model). This can be either a scalar or numeric vector the same size as z.
conf.level
The confidence level at which the Null Hypothesis is evaluated.

Value

  • A list with the following items:
  • statmatThe matrix of the statistics (see details).
  • H0The Null Hypothesis.
  • critical.valueThe critical value for each statistic.
  • DecisionWhether to reject or not the Null given the conf.level.

Details

This is a mispecification test based on Hansen's GMM procedure. Under a correctly specified model, certain population moment conditions should be satisfied and hold in the sample using the standardized residuals. The moment conditions can be tested both individually using a t-test or jointly using a Wald test (the vignette gives more details). The test returns a matrix containing the first 4 moments statistics, their standard error and t-values, M1 to M4, the t-value of the test of the the joint squared residuals under the specified number of lags, Q2 , and the t-value of the test of joint nullness, J. The joint tests (Q2 and J) are distributed chi-squared with n.lag and 4 + n.lag d.o.f. respectively, while the individual moment conditions may be tested for significance using a standard t-test.

References

Hansen, L. (1982), Large Sample Properties of Generalized Method of Moments Estimators, Econometrica, 50(4), 1029--1054.

Examples

Run this code
data(dji30ret)
spec = ugarchspec(mean.model = list(armaOrder = c(1,1), include.mean = TRUE),
variance.model = list(model = "gjrGARCH"), distribution.model = "sstd")
fit = ugarchfit(spec, data = dji30ret[, 1, drop = FALSE])
z = residuals(fit)\/sigma(fit)
skew = dskewness("sstd",skew = coef(fit)["skew"], shape= coef(fit)["shape"])
# add back 3 since dkurtosis returns the excess kurtosis
kurt = 3+dkurtosis("sstd",skew = coef(fit)["skew"], shape= coef(fit)["shape"])
print(GMMTest(z, lags = 1, skew=skew, kurt=kurt))

Run the code above in your browser using DataLab