FUNCTION REFERENCE

kpsstest

KPSS test of level or trend stationarity against a unit root.

KPSS test of level or trend stationarity against a unit root.

Syntax

[h,pValue,stat,cValue,reg] = kpsstest(y,Lags=0,Trend=true,Alpha=.05)

Regresses y on an intercept and, by default, a trend. The statistic is the sum of squared cumulative residuals divided by T^2 times the Bartlett Newey-West long-run variance. NaNs are removed. Vector Lags, Trend and Alpha expand scalars and must otherwise have equal lengths; any row option yields row outputs. Alpha is in [.01,.10]. Published Kwiatkowski et al. (1992) Table 1 critical values are interpolated linearly; p-values clamp to [.01,.10] with warnings. reg includes numeric regression statistics, autoCov and Bartlett HAC coefficient standard errors NWEst.

Example

[h,p,s,c,r]=kpsstest([1 3 2 5 4 7 6 2 3 1 5 2],Trend=false,Lags=1)

Differences from MATLAB: numeric vectors only; tables/timetables unsupported. Same resource bounds as adftest. reg.names is a string vector.

Reference: https://www.mathworks.com/help/econ/kpsstest.html

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.