gc_tests

Purpose

LM unit root test with Flexible Fourier form structural breaks.

Format

GC_out = GC_tests(data, vnames, pmax, ic, test, Nboot)
Parameters:
  • data (Txk matrix) – Data to be tested with k individual variables each in a separate column.
  • vnames (String array) – Variable names.
  • pmax (Scalar) – Maximum number of lags.
  • ic – The information criterion used for choosing lags.

0 Granger causality. 1 Toda & Yamamoto 2 Single Fourier-frequency Granger causality. 4 Single Fourier frequency Toda & Yamamoto. 5 Cumulative Fourier-frequency Toda & Yomamoto =========== ============================================= :type ic: Scalar

Parameters:Nboot (Scalar) – Number of bootstrap replications.
Returns:GC_out (Kx5 Matrix) – Results matrix containing Wald stat~P-values~Bootstrap P-values~Lags~Frequency

Examples

new;
cls;

library tspdlib;

// Number of bootstrap replications
Nboot= 1000;

// Number of observations
T  = 188;

// Number of lags in VAR model
pmax = 12;

// Information criterion
// 1 = Akaike;
// 2 = Schwarz;
ic   = 1;

// Set to perform Granger Causality
test = 0;

// Load data matrix
GCdata = loadd(__FILE_DIR $+ "TScaus.dat");
data   = ln(GCdata);

// Variable names
vnames = "y1"$|"y2"$|"y3"$|"y4";

// Toda & Yamamoto test
test = 1;

GC_out = GC_tests(data, vnames, pmax, ic, test, Nboot);

Source

gctests.src