GMMTest {rugarch} | R Documentation |
Implements the GMM Orthogonality Test of Hansen.
GMMTest(z, lags = 1, skew=0, kurt=0, conf.level = 0.95)
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. |
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.
A list with the following items:
statmat |
The matrix of the statistics (see details). |
H0 |
The Null Hypothesis. |
critical.value |
The critical value for each statistic. |
Decision |
Whether to reject or not the Null given the conf.level. |
Alexios Ghalanos
Hansen, L. (1982), Large Sample Properties of Generalized Method of Moments Estimators, Econometrica, 50(4), 1029–1054.
## Not run: 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)) ## End(Not run)