testGT: To test the result of granger test

Description Usage Arguments Details Value Examples

Description

To test the result of granger test

Usage

1
testGT(x, y, order.max)

Arguments

x

A vector represents one variable

y

A vector represents another variable

order.amx

The max time lag in granger test.

Details

There is two test for result. First test is to test whether the model is consistent, i.e. the dw is between 2 and 3. Second test is to judge whether the sum of residuals squares is different.

Value

A dataframe including sic items: judge is the judgement of causality,order, EU_Y is the sum of residuals squares in restricted model, aicEU_Y is the AIC value in restricted model, EUY is the sum of residuals squares in unrestricted model, aicEUY is the AIC value in unrestricted model, dw is the Durbin-Watson test value.

Examples

1
2
3
4
5
data("BMData")
i=7
x<-BMData[[i]]$u
y<-BMData[[i]]$y
result<-testGT(x,y,order.max=20)

chengfeifan/myCCM documentation built on May 13, 2019, 3:40 p.m.