Main Content

gctest

Block-wise Granger causality and block exogeneity tests

Since R2019a

Description

The gctest function conducts a block-wise Granger causality test by accepting sets of time series data representing the "cause" and "effect" multivariate response variables in the test. gctest supports the inclusion of optional endogenous conditioning variables in the model for the test.

To conduct the leave-one-out, exclude-all, and block-wise Granger causality tests on the response variables of a fully specified VAR model (represented by a varm model object), see gctest.

example

h = gctest(Y1,Y2) returns the test decision h from conducting a block-wise Granger causality test for assessing whether a set of time series variables in the numeric array Y1 Granger-causes a distinct set of the time series variables in the numeric array Y2. The gctest function conducts tests in the vector autoregression (VAR) framework and treats Y1 and Y2 as response (endogenous) variables during testing.

example

h = gctest(Y1,Y2,Y3) conducts a 1-step Granger causality test for Y1 and Y2, conditioned on a distinct set of time series variables in the numeric array Y3. The variable Y3 is endogenous in the underlying VAR model, but gctest does not consider it a "cause" or an "effect" in the test.

example

[h,pvalue,stat,cvalue] = gctest(___) also returns the p-value pvalue, test statistic stat, and critical value cvalue for the test, using any of the input argument combinations in the previous syntaxes.

example

StatTbl = gctest(Tbl) returns the table StatTbl containing the test results conducting a block-wise Granger causality test for assessing whether the all variables expect the last variable in the table or timetable Tbl Granger-cause a the last variable in Tbl. (since R2023a)

To select different Granger-cause or effect variables in Tbl for the test, use the CauseVariables or EffectVariables name-value argument.

example

___ = gctest(___,Name,Value) specifies options using one or more name-value arguments. For example, gctest(Y1,Y2,Test="f",NumLags=2) specifies conducting an F test that compares the residual sum of squares between restricted and unrestricted VAR(2) models for all response variables. gctest returns the output argument combination for the corresponding input arguments.

Examples

collapse all

Conduct a Granger causality test to assess whether the M1 money supply has an impact on the predictive distribution of the consumer price index (CPI). Supply data as numeric vectors.

Load the US macroeconomic data set Data_USEconModel.mat.

load Data_USEconModel

The data set includes the MATLAB® timetable DataTimeTable, which contains 14 variables measured from Q1 1947 through Q1 2009. M1SL is the table variable containing the M1 money supply, and CPIAUCSL is the table variable containing the CPI. For more details, enter Description at the command line.

Visually assess whether the series are stationary by plotting them in the same figure.

figure;
yyaxis left
plot(DataTimeTable.Time,DataTimeTable.CPIAUCSL)
ylabel("CPI");
yyaxis right
plot(DataTimeTable.Time,DataTimeTable.M1SL);
ylabel("Money Supply");

Figure contains an axes object. The axes object with ylabel Money Supply contains 2 objects of type line.

Both series are nonstationary.

Stabilize the series by converting them to rates.

m1slrate = price2ret(DataTimeTable.M1SL);
inflation = price2ret(DataTimeTable.CPIAUCSL);

Assume that a VAR(1) model is an appropriate multivariate model for the rates. Conduct a default Granger causality test to assess whether the M1 money supply rate Granger-causes the inflation rate.

h = gctest(m1slrate,inflation)
h = logical
   1

The test decision h is 1, which indicates the rejection of the null hypothesis that the M1 money supply rate does not Granger-cause inflation.

Time series undergo feedback when they Granger-cause each other. Assess whether the US inflation and M1 money supply rates undergo feedback.

Load the US macroeconomic data set Data_USEconModel.mat. Convert the price series to returns.

load Data_USEconModel
inflation = price2ret(DataTimeTable.CPIAUCSL);
m1slrate = price2ret(DataTimeTable.M1SL);

Conduct a Granger causality test to assess whether the inflation rate Granger-causes the M1 money supply rate. Assume that an underlying VAR(1) model is appropriate for the two series. The default level of significance α for the test is 0.05. Because this example conducts two tests, decrease α by half for each test to achieve a family-wise level of significance of 0.05.

hIRgcM1 = gctest(inflation,m1slrate,Alpha=0.025)
hIRgcM1 = logical
   1

The test decision hIRgcM1 = 1 indicates rejection of the null hypothesis of noncausality. There is enough evidence to suggest that the inflation rate Granger-causes the M1 money supply rate at 0.025 level of significance.

Conduct another Granger causality test to assess whether the M1 money supply rate Granger-causes the inflation rate.

hM1gcIR = gctest(m1slrate,inflation,Alpha=0.025)
hM1gcIR = logical
   0

The test decision hM1gcIR = 0 indicates that the null hypothesis of noncausality should not be rejected. There is not enough evidence to suggest that the M1 money supply rate Granger-causes the inflation rate at 0.025 level of significance.

Because not enough evidence exists to suggest that the inflation rate Granger-causes the M1 money supply rate, the two series do not undergo feedback.

Assess whether the US gross domestic product (GDP) Granger-causes CPI conditioned on the M1 money supply.

Load the US macroeconomic data set Data_USEconModel.mat.

load Data_USEconModel

The variables GDP and GDPDEF of DataTimeTable are the US GDP and its deflator with respect to year 2000 dollars, respectively. Both series are nonstationary.

Convert the M1 money supply and CPI to rates. Convert the US GDP to the real GDP rate.

m1slrate = price2ret(DataTimeTable.M1SL);
inflation = price2ret(DataTimeTable.CPIAUCSL);
rgdprate = price2ret(DataTimeTable.GDP./DataTimeTable.GDPDEF);

Assume that a VAR(1) model is an appropriate multivariate model for the rates. Conduct a Granger causality test to assess whether the real GDP rate has an impact on the predictive distribution of the inflation rate, conditioned on the M1 money supply. The inclusion of a conditional variable forces gctest to conduct a 1-step Granger causality test.

h = gctest(rgdprate,inflation,m1slrate)
h = logical
   0

The test decision h is 0, which indicates failure to reject the null hypothesis that the real GDP rate is not a 1-step Granger-cause of inflation when you account for the M1 money supply rate.

gctest includes the M1 money supply rate as a response variable in the underlying VAR(1) model, but it does not include the M1 money supply in the computation of the test statistics.

Conduct the test again, but without conditioning on the M1 money supply rate.

h = gctest(rgdprate,inflation)
h = logical
   0

The test result is the same as before, suggesting that the real GDP rate does not Granger-cause inflation at all periods in a forecast horizon and regardless of whether you account for the M1 money supply rate in the underlying VAR(1) model.

By default, gctest assumes an underlying VAR(1) model for all specified response variables. However, a VAR(1) model might be an inappropriate representation of the data. For example, the model might not capture all the serial correlation present in the variables.

To specify a more complex underlying VAR model, you can increase the number of lags by specifying the NumLags name-value argument of gctest.

Consider the Granger causality tests conducted in Conduct 1-Step Granger Causality Test Conditioned on Variable. Load the US macroeconomic data set Data_USEconModel.mat. Convert the M1 money supply and CPI to rates. Convert the US GDP to the real GDP rate.

load Data_USEconModel
m1slrate = price2ret(DataTimeTable.M1SL);
inflation = price2ret(DataTimeTable.CPIAUCSL);
rgdprate = price2ret(DataTimeTable.GDP./DataTimeTable.GDPDEF);

Preprocess the data by removing all missing observations (indicated by NaN).

idx = sum(isnan([m1slrate inflation rgdprate]),2) < 1;
m1slrate = m1slrate(idx);
inflation = inflation(idx);
rgdprate = rgdprate(idx);
T = numel(m1slrate); % Total sample size

Fit VAR models, with lags ranging from 1 to 4, to the real GDP and inflation rate series. Initialize each fit by specifying the first four observations. Store the Akaike information criteria (AIC) of the fits.

numseries = 2;
numlags = (1:4)';
nummdls = numel(numlags);

% Partition time base.
maxp = max(numlags); % Maximum number of required presample responses
idxpre = 1:maxp;
idxest = (maxp + 1):T;

% Preallocation
EstMdl(1:nummdls) = varm(numseries,0);
aic = zeros(nummdls,1);

% Fit VAR models to data.
Y0 = [rgdprate(idxpre) inflation(idxpre)]; % Presample
Y = [rgdprate(idxest) inflation(idxest)];  % Estimation sample
for j = 1:numel(numlags)
    Mdl = varm(numseries,numlags(j));
    Mdl.SeriesNames = ["rGDP" "Inflation"];
    EstMdl(j) = estimate(Mdl,Y,Y0=Y0);
    results = summarize(EstMdl(j));
    aic(j) = results.AIC;
end

p = numlags(aic == min(aic))
p = 3

A VAR(3) model yields the best fit.

Assess whether the real GDP rate Granger-causes inflation. gctest removes p observations from the beginning of the input data to initialize the underlying VAR(p) model for estimation. Prepend only the required p = 3 presample observations to the estimation sample. Specify the concatenated series as input data. Return the p-value of the test.

rgdprate3 = [Y0((end - p + 1):end,1); Y(:,1)];
inflation3 = [Y0((end - p + 1):end,2); Y(:,2)];
[h,pvalue] = gctest(rgdprate3,inflation3,NumLags=p)
h = logical
   1

pvalue = 7.7741e-04

The p-value is approximately 0.0008, indicating the existence of strong evidence to reject the null hypothesis of noncausality, that is, that the three real GDP rate lags in the inflation rate equation are jointly zero. Given the VAR(3) model, there is enough evidence to suggest that the real GDP rate Granger-causes at least one future value of the inflation rate.

Alternatively, you can conduct the same test by passing the estimated VAR(3) model (represented by the varm model object in EstMdl(3)), to the object function gctest. Specify a block-wise test and the "cause" and "effect" series names.

h = gctest(EstMdl(3),Type="block-wise", ...
    Cause="rGDP",Effect="Inflation")
                         H0                          Decision      Distribution    Statistic      PValue      CriticalValue
    ____________________________________________    ___________    ____________    _________    __________    _____________

    "Exclude lagged rGDP in Inflation equations"    "Reject H0"     "Chi2(3)"       16.799      0.00077741       7.8147    
h = logical
   1

If you are testing integrated series for Granger causality, then the Wald test statistic does not follow a χ2 or F distribution, and test results can be unreliable. However, you can implement the Granger causality test in [5] by specifying the maximum integration order among all the variables in the system using the Integration name-value argument.

Consider the Granger causality tests conducted in Conduct 1-Step Granger Causality Test Conditioned on Variable. Load the US macroeconomic data set Data_USEconModel.mat and take the log of real GDP and CPI.

load Data_USEconModel
cpi = log(DataTimeTable.CPIAUCSL);
rgdp = log(DataTimeTable.GDP./DataTimeTable.GDPDEF);

Assess whether the real GDP Granger-causes CPI. Assume the series are I(1), or order-1 integrated. Also, specify an underlying VAR(3) model and the F test. Return the test statistic and p-value.

[h,pvalue,stat] = gctest(rgdp,cpi,NumLags=3, ...
    Integration=1,Test="f")
h = logical
   1

pvalue = 0.0031
stat = 4.7557

The p-value = 0.0031, indicating the existence of strong evidence to reject the null hypothesis of noncausality, that is, that the three real GDP lags in the CPI equation are jointly zero. Given the VAR(3) model, there is enough evidence to suggest that real GDP Granger-causes at least one future value of the CPI.

In this case, the test augments the VAR(3) model with an additional lag. In other words, the model is a VAR(4) model. However, gctest tests only whether the first three lags are 0.

Since R2023a

Time series are block exogenous if they do not Granger-cause any other variables in a multivariate system. Test whether the effective federal funds rate is block exogenous with respect to the real GDP, personal consumption expenditures, and inflation rates. Provide data in a timetable.

Load the US macroeconomic data set Data_USEconModel.mat. Convert the price series to returns; specify durations between sampling times relative to years.

load Data_USEconModel
DataTimeTable.RGDP = DataTimeTable.GDP./DataTimeTable.GDPDEF;
EffectVariables = ["CPIAUCSL" "RGDP" "PCEC"];
DTTRet = price2ret(DataTimeTable,DataVariables=EffectVariables, ...
    Units="years");

Test whether the federal funds rate is nonstationary by conducting an augmented Dickey-Fuller test. Specify that the alternative model has a drift term and an F test.

StatTblADFTest = adftest(DataTimeTable,DataVariable="FEDFUNDS",Model="ard")
StatTblADFTest=1×8 table
                h       pValue      stat      cValue     Lags    Alpha     Model      Test 
              _____    ________    _______    _______    ____    _____    _______    ______

    Test 1    false    0.071419    -2.7257    -2.8751     0      0.05     {'ARD'}    {'T1'}

The test decision h = 0 indicates that the null hypothesis that the series has a unit root should not be rejected, at 0.05 significance level.

To stabilize the federal funds rate series, apply the first difference to it.

DTTRet.DFEDFUNDS = diff(DataTimeTable.FEDFUNDS);

Assume a 4-D VAR(3) model for the four series. Assess whether the federal funds rate is block exogenous with respect to the real GDP, personal consumption expenditures, and inflation rates. Supply the data in the timetable DTTRet, and conduct an F-based Wald test.

StatTblGCTEST = gctest(DTTRet,CauseVariables="DFEDFUNDS", ...
    EffectVariables=EffectVariables,NumLags=2,Test="f")
StatTblGCTEST=1×6 table
                h        pValue       stat     cValue    alpha    test
              _____    __________    ______    ______    _____    ____

    Test 1    true     3.9311e-10    10.465    2.1426    0.05     "f" 

The test decision hgc = 1 indicates that the null hypothesis that the federal funds rate is block exogenous should be rejected. This result suggests that the federal funds rate Granger-causes at least one of the other variables in the system.

To determine which variables the federal funds rate Granger-causes, you can run a leave-one-out test. For more details, see gctest function of the VAR model object varm.

Input Arguments

collapse all

Data for the response variables representing the Granger-causes in the test, specified as a numobs1-by-1 numeric vector or a numobs1-by-numseries1 numeric matrix. numobs1 is the number of observations and numseries1 is the number of time series variables.

Y1 must have enough rows to initialize and estimate the underlying VAR model. gctest uses the first NumLags observations to initialize the model for estimation.

Columns correspond to distinct time series variables.

Data Types: double | single

Data for response variables affected by the Granger-causes in the test, specified as a numobs2-by-1 numeric vector or a numobs2-by-numseries2 numeric matrix. numobs2 is the number of observations in the data and numseries2 is the number of time series variables.

Y2 must have enough rows to initialize and estimate the underlying VAR model. gctest uses the first NumLags observations to initialize the model for estimation.

Columns correspond to distinct time series variables.

Data Types: double | single

Data for conditioning response variables, specified as a numobs3-by-1 numeric vector or a numobs3-by-numseries3 numeric matrix. numobs3 is the number of observations in the data and numseries3 is the number of time series variables.

Y3 must have enough rows to initialize and estimate the underlying VAR model. gctest uses the first NumLags observations to initialize the model for estimation.

Columns correspond to distinct time series variables.

If you specify Y3, then Y1, Y2, and Y3 represent the response variables in the underlying VAR model. gctest assesses whether Y1 is a 1-step Granger-cause of Y2, given the presence of Y3.

Data Types: double | single

Since R2023a

Time series data for the Granger-cause y1,t, effect y2,t, conditioning y3,t, and predictor xt variables of the test, specified as a table or timetable with numseries variables and numobs rows.

Row t contains the observation in time t, and the last row contains the latest observation. Tbl must have enough rows to initialize and estimate the underlying VAR model. gctest uses the first NumLags observations as a presample to initialize the model for estimation.

You can optionally select Granger-cause, effects, conditioning, or predictor variables by using the CauseVariables, EffectVariables, ConditionVariables, or PredictorVariables name-value argument, respectively.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: gctest(Y1,Y2,Alpha=0.10,NumLags=2) specifies a 0.10 significance level for the test and uses an underlying VAR(2) model for all response variables.

Number of lagged responses to include in the underlying VAR model for all response variables, specified as a nonnegative integer. The resulting underlying model is a VAR(NumLags) model.

Example: NumLags=2

Data Types: double | single

Maximum order of integration among all response variables, specified as a nonnegative integer.

To address integration, gctest augments the VAR(NumLags) model by adding additional lagged responses beyond NumLags to all equations during estimation. For more details, see [5] and [3].

Example: Integration=1

Data Types: double | single

Flag indicating the inclusion of model intercepts (constants) in the underlying VAR model, specified as a value in this table.

ValueDescription
trueAll equations in the underlying VAR model have an intercept. gctest estimates the intercepts with all other estimable parameters.
falseAll underlying VAR model equations do not have an intercept. gctest sets all intercepts to 0.

Example: Constant=false

Data Types: logical

Flag indicating the inclusion of linear time trends in the underlying VAR model, specified as a value in this table.

ValueDescription
trueAll equations in the underlying VAR model have a linear time trend. gctest estimates the linear time trend coefficients with all other estimable parameters.
falseAll underlying VAR model equations do not have a linear time trend.

Example: Trend=false

Data Types: logical

Predictor data for exogenous predictor variables xt in the underlying VAR model, specified as a numeric matrix containing numpreds columns. numpreds is the number of predictor variables.

Row t contains the observation in time t, and the last row contains the latest observation. gctest does not use the regression component in the presample period. X must have at least as many observations as the number of observations used by gctest after the presample period. Specifically, X must have at least numobsMdl.P observations, where numobs = min([numobs1 numobs2 numobs3]). If you supply more rows than necessary, gctest uses the latest observations only.

Columns correspond to individual predictor variables. gctest treats predictors as exogenous. All predictor variables are present in the regression component of each response equation.

By default, gctest excludes a regression component from all equations.

Example: X=x applies the numeric vector of data x to the 1-D regression component of each response equation of in the underlying VAR model.

Data Types: double

Significance level for the test, specified as a numeric scalar in (0,1).

Example: Alpha=0.1

Data Types: double | single

Test statistic distribution under the null hypothesis, specified as a value in this table.

ValueDescription
"chi-square"gctest derives outputs from conducting a χ2 test.
"f"gctest derives outputs from conducting an F test.

For test statistic forms, see [4].

Example: Test="f"

Data Types: char | string

Since R2023a

Variables to select from Tbl to treat as the Granger-cause variables y1,t, specified as one of the following data types:

  • String vector or cell vector of character vectors of variable names in Tbl.Properties.VariableNames

  • A vector of unique indices (positive integers) of variables to select from Tbl.Properties.VariableNames

  • A logical vector, where CauseVariables(j) = true selects variable j from Tbl.Properties.VariableNames

The selected variables must be numeric vectors and cannot contain missing values (NaNs). The variables in CauseVariables, EffectVariables, and ConditionVariables, and PredictorVariables must be mutually exclusive.

The default specifies all variables in Tbl except for the variable specified by the EffectVariables name-value argument.

Example: CauseVariables=["GDP" "CPI"]

Example: CauseVariables=[true false true false] or CauseVariable=[1 3] selects the first and third table variables as the Granger-cause variables.

Data Types: double | logical | char | cell | string

Since R2023a

Variables to select from Tbl to treat as the effect variables y2,t, specified as one of the following data types:

  • String vector or cell vector of character vectors of variable names in Tbl.Properties.VariableNames

  • A vector of unique indices (positive integers) of variables to select from Tbl.Properties.VariableNames

  • A logical vector, where EffectVariables(j) = true selects variable j from Tbl.Properties.VariableNames

The selected variables must be numeric vectors and cannot contain missing values (NaNs). The variables in CauseVariables, EffectVariables, and ConditionVariables, and PredictorVariables must be mutually exclusive.

The default specifies the last variable in Tbl, Tbl.Properties.VariableNames(end).

Example: EffectVariables="COE"

Example: EffectVariables=[false true false false] or EffectVariable=2 selects the second variable as the effect variable.

Data Types: double | logical | char | cell | string

Since R2023a

Variables to select from Tbl to treat as the conditioning variables y3,t, specified as one of the following data types:

  • String vector or cell vector of character vectors of variable names in Tbl.Properties.VariableNames

  • A vector of unique indices (positive integers) of variables to select from Tbl.Properties.VariableNames

  • A logical vector, where ConditionVariables(j) = true selects variable j from Tbl.Properties.VariableNames

The selected variables must be numeric vectors and cannot contain missing values (NaNs). The variables in CauseVariables, EffectVariables, and ConditionVariables, and PredictorVariables must be mutually exclusive.

If you specify ConditionVariables, the following conditions apply:

  • You must specify CauseVariables and EffectVariables.

  • The CauseVariables, EffectVariables, and ConditionVariables represent the response variables in the underlying VAR model. gctest assesses whether CauseVariables is a 1-step Granger-cause of EffectVariables, given the presence of ConditionVariables.

By default, gctest does not apply conditioning variables.

Example: ConditionVariables=["GDP" "CPI"]

Example: ConditionVariables=[true true true false] or ConditionVariable=4 selects the fourth table variable as the conditioning variable.

Data Types: double | logical | char | cell | string

Since R2023b

Variables to select from Tbl to treat as exogenous predictor variables xt in the underlying VAR model, specified as one of the following data types:

  • String vector or cell vector of character vectors of variable names in Tbl.Properties.VariableNames

  • A vector of unique indices (positive integers) of variables to select from Tbl.Properties.VariableNames

  • A logical vector, where PredictorVariables(j) = true selects variable j from Tbl.Properties.VariableNames

The selected variables must be numeric vectors and cannot contain missing values (NaNs). The variables in CauseVariables, EffectVariables, and ConditionVariables, and PredictorVariables must be mutually exclusive. gctest does not apply the regression component in the presample period. All selected variables are present in the regression component of each response equation.

If you specify PredictorVariables, you must also specify CauseVariables and EffectVariables.

By default, gctest excludes a regression component from all equations.

Example: PredictorVariables=["M1SL" "TB3MS" "UNRATE"] selects the variables M1SL, TB3MS, and UNRATE.

Example: PredictorVariables=[true false true false] or =[1 3] selects the first and third table variables to supply the predictor data.

Data Types: double | single | logical | char | cell | string

Note

gctest assumes you synchronize the input data sets and arrange those inputs by increasing sampling time, regardless of data type.

Output Arguments

collapse all

Block-wise Granger causality test decision, returned as a logical scalar. gctest returns h when you supply data as numeric arrays.

  • h = 1 indicates rejection of H0.

    • If you specify the conditioning response data Y3, then sufficient evidence exists to suggest that the response variables represented in Y1 are 1-step Granger-causes of the response variables represented in Y2, conditioned on the response variables represented in Y3.

    • Otherwise, sufficient evidence exists to suggest that the variables in Y1 are h-step Granger-causes of the variables in Y2 for some h ≥ 0. In other words, Y1 is block endogenous with respect to Y2.

  • h = 0 indicates failure to reject H0.

    • If you specify Y3, then the variables in Y1 are not 1-step Granger-causes of the variables in Y2, conditioned on Y3.

    • Otherwise, Y1 does not Granger-cause Y2. In other words, there is not enough evidence to reject block exogeneity of Y1 with respect to Y2.

p-value, returned as a numeric scalar. gctest returns pValue when you supply data as numeric arrays.

Test statistic, returned as a numeric scalar. gctest returns stat when you supply data as numeric arrays.

Critical value for the significance level Alpha, returned as a numeric scalar. gctest returns cValue when you supply data as numeric arrays.

Test summary, returned as a table with variables for output rejection decisions h, p-values pValue, test statistics stat, and critical values cValue. gctest returns StatTbl when you supply the input Tbl.

StatTbl also contains variables for the test settings specified by Alpha and Test. (since R2023b)

More About

collapse all

Granger Causality Test

The Granger causality test is a statistical hypothesis test that assesses whether past and present values of a set of m1 = numseries1 time series variables y1,t, called the "cause" variables, affect the predictive distribution of a distinct set of m2 = numseries2 time series variables y2,t, called the "effect" variables. The impact is a reduction in forecast mean squared error (MSE) of y2,t. If past values of y1,t affect y2,t + h, then y1,t is an h-step Granger-cause of y2,t. In other words, y1,t Granger-causes y2,t if y1,t is an h-step Granger-cause of y2,t for all h ≥ 1.

Consider a stationary VAR(p) model for [y1,t y2,t]:

[y1,ty2,t]=c+δt+βxt+[Φ11,1Φ12,1Φ21,1Φ22,1][y1,t1y2,t1]+...+[Φ11,pΦ12,pΦ21,pΦ22,p][y1,tpy2,tp]+[ε1,tε2,t].

Assume the following conditions:

  • Future values cannot inform past values.

  • y1,t uniquely informs y2,t (no other variable has the information to inform y2,t).

If Φ21,1 = … = Φ21,p = 0m1,m2, then y1,t is not the block-wise Granger cause of y2,t + h, for all h ≥ 1 and where 0m2,m1 is an m2-by-m1 matrix of zeros. Also, y1,t is block exogenous with respect to y2,t. Consequently, the block-wise Granger causality test hypotheses are:

H0:Φ21,1=...=Φ21,p=0m2,m1H1:j{1,...,p}Φ21,j0m2,m1.

H1 implies that at least one h ≥ 1 exists such that y1,t is an h-step Granger-cause of y2,t.

gctest conducts χ2-based or F-based Wald tests (see 'Test'). For test statistic forms, see [4].

Distinct conditioning endogenous variables y3,t can be included in the system (see Y3). In this case, the VAR(p) model is:

[y1,ty2,ty3,t]=c+δt+βxt+[Φ11,1Φ12,1Φ13,1Φ21,1Φ22,1Φ23,1Φ31,1Φ32,1Φ33,1][y1,t1y2,t1y3,t1]+...+[Φ11,pΦ12,pΦ13,pΦ21,pΦ22,pΦ23,pΦ31,pΦ32,pΦ33,p][y1,tpy2,tpy3,tp]+[ε1,tε2,tε3,t].

gctest does not test the parameters associated with the conditioning variables. The test assesses only whether y1,t is an 1-step Granger-cause of y2,t.

Vector Autoregression Model

A vector autoregression (VAR) model is a stationary multivariate time series model consisting of a system of m equations of m distinct response variables as linear functions of lagged responses and other terms.

A VAR(p) model in difference-equation notation and in reduced form is

yt=c+Φ1yt1+Φ2yt2+...+Φpytp+βxt+δt+εt.

  • yt is a numseries-by-1 vector of values corresponding to numseries response variables at time t, where t = 1,...,T. The structural coefficient is the identity matrix.

  • c is a numseries-by-1 vector of constants.

  • Φj is a numseries-by-numseries matrix of autoregressive coefficients, where j = 1,...,p and Φp is not a matrix containing only zeros.

  • xt is a numpreds-by-1 vector of values corresponding to numpreds exogenous predictor variables.

  • β is a numseries-by-numpreds matrix of regression coefficients.

  • δ is a numseries-by-1 vector of linear time-trend values.

  • εt is a numseries-by-1 vector of random Gaussian innovations, each with a mean of 0 and collectively a numseries-by-numseries covariance matrix Σ. For ts, εt and εs are independent.

Condensed and in lag operator notation, the system is

Φ(L)yt=c+βxt+δt+εt,

where Φ(L)=IΦ1LΦ2L2...ΦpLp, Φ(L)yt is the multivariate autoregressive polynomial, and I is the numseries-by-numseries identity matrix.

For example, a VAR(1) model containing two response series and three exogenous predictor variables has this form:

y1,t=c1+ϕ11y1,t1+ϕ12y2,t1+β11x1,t+β12x2,t+β13x3,t+δ1t+ε1,ty2,t=c2+ϕ21y1,t1+ϕ22y2,t1+β21x1,t+β22x2,t+β23x3,t+δ2t+ε2,t.

References

[1] Granger, C. W. J. "Investigating Causal Relations by Econometric Models and Cross-Spectral Methods." Econometrica. Vol. 37, 1969, pp. 424–459.

[2] Hamilton, James D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.

[3] Dolado, J. J., and H. Lütkepohl. "Making Wald Tests Work for Cointegrated VAR Systems." Econometric Reviews. Vol. 15, 1996, pp. 369–386.

[4] Lütkepohl, Helmut. New Introduction to Multiple Time Series Analysis. New York, NY: Springer-Verlag, 2007.

[5] Toda, H. Y., and T. Yamamoto. "Statistical Inferences in Vector Autoregressions with Possibly Integrated Processes." Journal of Econometrics. Vol. 66, 1995, pp. 225–250.

Version History

Introduced in R2019a

expand all

See Also

Objects

Functions