kpsstest
KPSS test for stationarity
Syntax
Description
h = kpsstest(y)
StatTbl = kpsstest(Tbl)Tbl. To select a different variable in
                                        Tbl to test, use the
                                        DataVariable name-value
                                argument.
[___] = kpsstest(___,
                                specifies options using one or more name-value arguments in
    addition to any of the input argument combinations in previous syntaxes.
        Name=Value)kpsstest returns the output argument combination for the
    corresponding input arguments.
Some options control the number of tests to conduct. The following
                                conditions apply when kpsstest conducts
                                multiple tests:
For example,
                                        kpsstest(Tbl,DataVariable="GDP",Alpha=0.025,Lags=[0
                                        1]) conducts two tests, at a level of significance
                                of 0.025, for the presence of a unit root in the variable
                                        GDP of the table Tbl.
                                The first test includes 0 autocovariance lags in
                                the Newey-West estimator of the long-run variance and the second
                                test includes 1 autocovariance lag.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Tips
- To draw valid inferences from a KPSS test, you must determine a suitable value for the - Lagsargument. The following methods can determine a suitable number of lags:- Begin with a small number of lags, and then evaluate the sensitivity of the results by adding more lags. 
- Kwiatkowski et al. [2] suggest that a number of lags on the order of , where T is the effective sample size, is often satisfactory under both the null and the alternative. 
 - For consistency of the Newey-West estimator, the number of lags must approach infinity as the sample size increases. 
- With a specific testing strategy in mind, determine the value of the - Trendargument by the growth characteristics of the input time series.- If the input series grows, include a trend term by setting - Trendto- true(default). This setting provides a reasonable comparison of a trend stationary null and a unit root process with drift.
- If a series does not exhibit long-term growth characteristics, exclude a trend term by setting - Trendto- false.
 
Algorithms
- Test statistics follow nonstandard distributions under the null, even asymptotically. Kwiatkowski et al. [2] use Monte Carlo simulations, for models with and without a trend, to tabulate asymptotic critical values for a standard set of significance levels between 0.01 and 0.1. - kpsstestinterpolates critical values and p-values from these tables.
References
[1] Hamilton, James D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
[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.
Version History
Introduced in R2009b


