pd_cause#

Purpose#

Computes tests for Granger causality in heterogeneous mixed panels with bootstrap critical values.

Format#

pd_stat = pd_cause(data, Ncross, test[, pmax, dmax, ic, Nboot, vnames])#
Parameters:
  • data (Txk matrix) – Data to be tested with k individual variables each in a separate column.

  • Ncross (Scalar) – Number of cross sections.

  • test (String) –

    The panel data causality test to be implemented.

    ”fisher”

    Fisher test.

    ”zhnc”

    Panel Zhnc statistic.

    ”surwald”

    Panel SUR Wald statistic.

  • pmax (Scalar) – Optional, maximum number of lags. Default = 8.

  • dmax (Scalar) – Optional, maximum integration degree of variables. Default = 1.

  • ic (Scalar) –

    Optional, the information criterion used for choosing lags. Default = 1.

    1

    Akaike.

    2

    Schwarz.

    3

    t-stat significance.

    Default = 2.

  • Nboot (Scalar) – Optional, Number of bootstrap replications. Default = 1000.

  • vnames (String array) – Variable names.

Returns:

cause_stat (Dataframe) – Panel causation statistics. Prints individual results and bootstrap critical values.

Examples#

library tspdlib;

// Load data
data = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/pdcause.dat");

// Number of cross-sections
N = 9;

/*
** Run Fisher test
*/
test = "fisher";

// Call test
cause_stat = pd_cause(data, N, test);

/*
** Run Zh and Zn test
*/
test = "zhnc";

// Call test
cause_stat = pd_cause(data, N, test);

/*
** Run SURwald test
*/
test = "surwald";

// Call test
cause_stat = pd_cause(data, N, test);

Source#

pd_cause.src