Documentation

# i10test

Paired integration and stationarity tests

## Syntax

``i10test(X)``
``i10test(X,Name,Value)``
``H = i10test(___)``
``````[H,PValue] = i10test(___)``````

## Description

example

````i10test(X)` displays the results of paired integration and stationarity tests on the variables in `X`.```

example

````i10test(X,Name,Value)` uses additional options specified by one or more `Name,Value` pairs. If you specify the `numDiffs` option, the paired integration and stationarity tests are conducted on the variables in `X` and their specified differences.```

example

````H = i10test(___)` returns logical values with the rejection decisions for the tests. You can use any of the previous input arguments.```
``````[H,PValue] = i10test(___)``` additionally returns the p-values for the test statistics.```

## Examples

collapse all

Conduct paired integration and stationarity tests on two time series using the default tests and settings.

Load the Nelson-Plosser data, and extract the series of real GNP, `GNPR`, and consumer price index, `CPI`.

```load Data_NelsonPlosser X = DataTable{:,{'GNPR','CPI'}};```

`X` is a matrix containing the data for the variables `GNPR` and `CPI`.

Conduct the default integration (`adftest`) stationarity (`kpsstest`) tests on the two time series.

`i10test(X)`
```Test Results I(1) I(0) ====================== var1 0 1 0.9990 0.0100 ---------------------- var2 0 1 0.9990 0.0100 ---------------------- ```

The warnings indicate that the p-values are very large for `adftest` and very small for `kpsstest` (that is, they are outside the Monte Carlo simulated tables). For both series, a unit root is not rejected (`H = 0` for `I(1)`), and stationarity is rejected (`H = 1` for `I(0)`).

Conduct paired integration and stationarity tests on two time series and their differences.

Load the Nelson-Plosser data, and extract the series of real GNP, `GNPR`, and consumer price index, `CPI`.

```load Data_NelsonPlosser X = DataTable(:,{'GNPR','CPI'});```

`X` is a tabular array containing the variables `GNPR` and `CPI`.

Set the integration and stationarity test parameters.

```I.names = {'lags','model'}; I.vals = {1,'TS'}; S.names = {'trend'}; S.vals = {true};```

The integration test is the default (`adftest`), augmented with one lagged difference term and a trend-stationary alternative. The stationarity test is the default (`kpsstest`) with a trend.

Conduct the integration and stationarity tests on the variables and their first differences, specified using `numDiffs`.

```i10test(X,'numDiffs',1,'itest','adf','iparams',I,... 'stest','kpss','sparams',S)```
```Test Results I(1) I(0) ====================== GNPR 0 1 0.8760 0.0100 D1GNPR 1 0 0.0054 0.1000 ---------------------- CPI 0 1 0.9799 0.0100 D1CPI 1 0 0.0010 0.0568 ---------------------- ```

The warnings indicate that the p-values are very large or small for some of the tests (that is, they are outside the Monte Carlo simulated tables). For each original series, a unit root is not rejected (`H = 0` for `I(1)`), and stationarity is rejected (`H = 1` for `I(0)`). For the differenced series, a unit root is rejected and stationarity is not rejected.

At the given parameter settings, the tests suggest that both series have one degree of integration.

Conduct paired integration and stationarity tests on two time series and their differences. Turn the results display off, and return the test decisions and p-values.

Load the Nelson-Plosser data, and extract the series of real GNP, `GNPR`, and consumer price index, `CPI`.

```load Data_NelsonPlosser X = DataTable(:,{'GNPR','CPI'});```

`X` is a tabular array containing the variables `GNPR` and `CPI`.

Set the integration and stationarity test parameters.

```I.names = {'lags','model'}; I.vals = {1,'TS'}; S.names = {'trend'}; S.vals = {true};```

Conduct the integration and stationarity tests on the variables and their first differences, specified using `numDiffs`.

```[H,PValue] = i10test(X,'numDiffs',1,'itest','adf',... 'iparams',I,'stest','kpss',... 'sparams',S,'display','off')```
```H = 4×2 0 1 1 0 0 1 1 0 ```
```PValue = 4×2 0.8760 0.0100 0.0054 0.1000 0.9799 0.0100 0.0010 0.0568 ```

The warnings indicate that the p-values are very large or small for some of the tests (that is, they are outside the Monte Carlo simulated tables). The test decisions and p-values are stored in `H` and `PValue`, respectively.

For each original series, a unit root is not rejected (`H = 0`), and stationarity is rejected (`H = 1`), as indicated in the first and third rows of the output `H`. For each differenced series, a unit root is rejected (`H = 1`), and stationarity is not rejected (`H = 0`), as indicated in the second and fourth rows of the output `H`.

At the given parameter settings, the tests suggest that both series have one degree of integration.

## Input Arguments

collapse all

Input variables on which to perform the stationary and integration tests, specified as a `numObs`-by-`numVars` numeric matrix or tabular array. `X` consists of `numObs` observations made on `numVars` variables.

If `X` is a tabular array, then the variables must be numeric.

Data Types: `double` | `table`

### Name-Value Pair Arguments

Specify optional comma-separated pairs of `Name,Value` arguments. `Name` is the argument name and `Value` is the corresponding value. `Name` must appear inside quotes. You can specify several name and value pair arguments in any order as `Name1,Value1,...,NameN,ValueN`.

Example: `'itest','pp','numDiffs',1` specifies a Phillips-Perron integration test (and default stationarity test) on all variables and their first differences

Variable names to be used in the display, specified as the comma-separated pair consisting of `'varNames'` and a string vector or cell array of character vectors with `numVars` names. All variable names are truncated to the first five characters.

• If `X` is a matrix, then the default variable names are `{'var1','var2',...}`.

• If `X` is a tabular array, then the default variable names are `X.Properties.VariableNames`.

Example: `'varNames',{'CPF','AGE','BBD'}`

Number of differences of each variable in `X` to test, specified as the comma-separated pair consisting of `'numDiffs'` and a scalar number.

Example: `'numDiffs',2`

Integration test to conduct, specified as the comma-separated pair consisting of `'itest'` and one of the following:

 `'adf'` Augmented Dickey-Fuller test `'pp'` Phillips-Perron test

Example: `'itest','pp'`

Integration test parameters, specified as the comma-separated pair consisting of `'iparams'` and a structure, `I`, with two fields, `I.names` and `I.vals`.

• `I.names` is a cell array of valid parameter names for the integration test specified in `itest`.

• `I.vals` is a cell array the same length as `I.names` containing corresponding parameter values for the parameter names in `I.names`.

If any parameters for the integration test are unspecified, then `i10test` uses default values. The default value for `I` is an empty structure, meaning `i10test` uses test defaults.

Stationarity test to conduct, specified as the comma-separated pair consisting of `'stest'` and one of the following:

 `'kpss'` KPSS test `'lmc'` Leybourne-McCabe test

Example: `'stest','lmc'`

Stationarity test parameters, specified as the comma-separated pair consisting of `'sparams'` and a structure, `S`, with two fields, `S.names` and `S.vals`.

• `S.names` is a cell array of valid parameter names for the integration test specified in `stest`.

• `S.vals` is a cell array the same length as `S.names` containing corresponding parameter values for the parameter names in `S.names`.

If any parameters for the stationarity test are unspecified, then `i10test` uses default values. The default value for `S` is an empty structure, meaning `i10test` uses test defaults.

Results table flag for whether to display a results table in the Command Window, specified as the comma-separated pair consisting of `'display'` and one of `'on'` or `'off'`.

If you specify the value `'on'`, then the outputs are displayed to the Command Window in a table showing test results, `H`, and corresponding p-values, `PValue`. Rows are labeled by variable names and their differences. Columns are labeled as `I(1)` (for integration) and `I(0)` (for stationarity), respectively, indicating the null hypothesis of the tests.

Example: `'display','off'`

## Output Arguments

collapse all

Test decisions, returned as a `numVars*numDiffs+1`-by-`2` matrix of logical values. `H` equal to `1` indicates rejection of the null hypothesis in favor of the alternative. `H` equal to `0` indicates failure to reject the null hypothesis.

• Rows of `H` correspond, in order, to ${x}_{1},\Delta {x}_{1},{\Delta }^{2}{x}_{1},\dots ,{\Delta }^{D}{x}_{1},{x}_{2},\Delta {x}_{2},{\Delta }^{2}{x}_{2},\dots ,{\Delta }^{D}{x}_{2},\dots$, where Δ is the differencing operator and D is the specified number of differences.

• Columns of `H` correspond to the null hypothesis of integration, `I(1)`, and the null hypothesis of stationarity, `I(0)`, respectively.

P-values for the tests, returned as a `numVars*numDiffs+1`-by-`2` matrix.

• Rows of `PValue` correspond, in order, to ${x}_{1},\Delta {x}_{1},{\Delta }^{2}{x}_{1},\dots ,{\Delta }^{D}{x}_{1},{x}_{2},\Delta {x}_{2},{\Delta }^{2}{x}_{2},\dots ,{\Delta }^{D}{x}_{2},\dots$, where Δ is the differencing operator and D is the specified number of differences.

• Columns of `PValue` correspond to the null hypothesis of integration, `I(1)`, and the null hypothesis of stationarity, `I(0)`, respectively.

## Tips

• Paired integration and stationarity tests have been suggested as a method for mutual confirmation of individual test results (for example, Kwiatkowski, Phillips, Schmidt, and Shin ). However, on the same set of data, different integration tests might disagree, different stationarity tests might disagree, and stationarity tests might fail to confirm integration tests. Still, Monte Carlo studies (for example, Amano and van Norden , Burke) suggest that paired testing is generally more reliable than using either type of test alone.

 Kwiatkowski, D., P. C. B. Phillips, P. Schmidt, and Y. Shin. “Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root.” Journal of Econometrics. Vol. 54, 1992, pp. 159–178.

 Amano, R. A., and S. van Norden. “Unit Root Tests and the Burden of Proof.” Bank of Canada. Working paper 92–7, 1992.

 Burke, S. P. “Confirmatory Data Analysis: The Joint Application of Stationarity and Unit Root Tests.” University of Reading, UK. Discussion paper 20, 1994.