# lmctest

Leybourne-McCabe stationarity test

## Syntax

## Description

returns
the rejection decision from conducting the Leybourne-McCabe stationarity test
for assessing whether an input univariate time series is stationary.`h`

= lmctest(`y`

)

returns a table containing variables for the test results, statistics, and settings from
conducting the Leybourne-McCabe stationarity test on the last variable of an input table or
timetable. To select a different variable to test, use the `StatTbl`

= lmctest(`Tbl`

)`DataVariable`

name-value argument.

`[___] = lmctest(___,`

specifies options using one or more name-value arguments in
addition to any of the input argument combinations in previous syntaxes.
`Name=Value`

)`lmctest`

returns the output argument combination for the
corresponding input arguments.

Some options control the number of tests to conduct. The following conditions apply when
`lmctest`

conducts multiple tests:

For example, ```
lmctest(Tbl,DataVariable="GDP",Alpha=0.025,Lags=[0
1])
```

conducts two tests, at a level of significance of 0.025, on the variable
`GDP`

of the table `Tbl`

. The first test includes
`0`

lagged terms in the structural model, and the second test includes
`1`

lagged term in the structural model.

`[___,`

additionally returns structures of regression statistics, which are required to form the
test
statistic.`reg1`

,`reg2`

] = lmctest(___)

`reg1`

– Maximum likelihood estimation of the reduced-form model`reg2`

– Deterministic local level model of filtered response data, with Gaussian noise and an optional linear trend

## Examples

## Input Arguments

## Output Arguments

## More About

## Tips

The alternative hypothesis that

*σ*^{2}_{2}> 0 implies 0 <*a*< 1. As a result, an alternative model with*a*= 0 and a random walk, reduced-form model with iid errors is not possible. The class of*I*(1) alternatives represented by such a model is appropriate for economic series with significant MA(1) components [3]. To test for a random walk, use`vratiotest`

.

## Algorithms

The value of the

`Lags`

option lags the response in the structural model, and the reduced-form model operates on the first difference of the response. In general, when a time series is lagged or differenced, the sample size is reduced. Without a presample, if*y*is defined for_{t}*t*= 1,…,*T*, the lagged series*y*_{t–k}is defined for*t*=*k*+1,…,*T*. When*y*_{t–k}is differenced, the time base reduces to*k*+2,…,*T*.*p*lagged differences reduce the common time base to*p*+2,…,*T*and the effective sample size is*T*– (*p*+1).Test statistics follow nonstandard distributions under the null, even asymptotically. Asymptotic critical values for a standard set of significance levels between 0.01 and 0.1, for models with and without a trend, have been tabulated in [2] using Monte Carlo simulations. Critical values

`cValue`

and*p*-values`pValue`

reported by`lmctest`

are interpolated from the tables. The tabulated tables are identical to those for`kpsstest`

.Bootstrapped critical values, used by tests with a unit root null (such as

`adftest`

and`pptest`

), are not possible for`lmctest`

[1]. As a result, size distortions for small samples may be significant, especially for highly persistent processes.

## References

[1] Caner, M., and L. Kilian. "Size Distortions of Tests of the Null
Hypothesis of Stationarity: Evidence and Implications for the PPP Debate." *Journal
of International Money and Finance*. Vol. 20, 2001, pp. 639–657.

[2] 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.

[3] Leybourne, S. J., and B. P. M. McCabe. "A Consistent Test for a
Unit Root." *Journal of Business and Economic Statistics*. Vol. 12, 1994,
pp. 157–166.

[4] Leybourne, S. J., and B. P. M. McCabe. "Modified Stationarity
Tests with Data-Dependent Model-Selection Rules." *Journal of Business and Economic
Statistics*. Vol. 17, 1999, pp. 264–270.

[5] Schwert, G. W. "Effects of Model Specification on Tests for Unit
Roots in Macroeconomic Data." *Journal of Monetary Economics*. Vol. 20,
1987, pp. 73–103.

## Version History

**Introduced in R2010a**