GT: To do the granger test between two time series

Description Usage Arguments Details Value

Description

To do the granger test between two time series

Usage

1
GT(x, y, order)

Arguments

x

A vector represents one variable

y

A vector represents another variable

order

a number indicating the time order in line model

Details

The model used in this function is just linear model(lm), the way to estimate the linear model is OLS. To consider the model is consistent, dw value should be between 2 and 3.

Value

A dataframe including sic items: 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.


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