KPSS Unit Root Test

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.

KPSS Unit Root Test

Postby TomDoan » Mon Jun 04, 2012 8:11 pm

Performs the KPSS test from Kwiatowski, Phillips, Schmidt & Shin(1992), "Testing the Null Hypothesis of Stationarity Against the Alternative of a Unit Root: How Sure Are We That Economic Time Series Have a Unit Root?", J. of Econometrics, vol 54, pp 159-178. Unlike most unit root tests, this has the null of stationarity (around a constant or trend) and rejects if the series is more persistent than would be compatible with stationarity. The KPSS test is on the Unit Root Test wizard on the Time Series menu.

kpss.src
Procedure file. Requires RATS 7.3 or later
(4.53 KiB) Downloaded 117 times


@KPSS( options ) series start end

Options
DET=[CONSTANT]/TREND
The component around which the null of stationarity is assumed.

LMAX=maximum number of lags in window [not used]
LAGS=specific number of lags to use [4]
The KPSS test requires an estimate of the long-run variance, which is computed using a Bartlett (Newey-West) window. The value of the test statistic will change based upon the number used. If you use the LMAX option, the procedure will show the test statistic for the range of lags up to LMAX. Otherwise, it will do only the test with the number of lags chosen.

[PRINT]/NOPRINT
TITLE=title for report ["KPSS Test for Stationarity"]

Variables Defined

%NOBS number of observations
%CDSTAT test statistic (using highest lag)


Example

Code: Select all
*
* Greene, Econometric Analysis, 7th Edition
* Example 23.3 and 23.4 from pp 1026-1028
*
open data tablef5-2.txt
calendar(q) 1950
data(format=prn,org=columns) 1950:01 2000:04 year qtr realgdp realcons $
 realinvs realgovt realdpi cpi_u m1 tbilrate unemp pop infl realint
*
set loggdp  = log(realgdp)
*
* ADFAutoSelect does a sequence of DF tests and displays a table of
* criteria which can be used to select the lag length. The final column
* has the test statistic. This differs from  the one in the stand-alone
* DFUNIT because ADFAutoSelect uses only the data points allowed when 14
* lags are included, while DFUNIT (by default), uses the maximum range
* allowed with the number of lags used on it.
*
@adfautoselect(maxlags=14,det=trend,print) loggdp
@dfunit(lags=1,det=trend) loggdp
*
@ppunit(lags=4,det=trend) loggdp
*
* KPSS test (example 22.4)
*
@kpss(lags=10,det=constant) loggdp
@kpss(lags=10,det=trend) loggdp


TableF5-2.txt
Data file for example
(22.42 KiB) Downloaded 58 times


Sample Output

Code: Select all
KPSS Test for Stationarity about Trend, Series LOGGDP
From 1950:01 to 2000:04
Observations 204

Sig Level Crit Value
1%(**)    0.216000
2.5%      0.176000
5%(*)     0.146000
10%       0.119000

  Lags    TestStat
       10 0.311579**


Because the null is that the series is trend-stationary, this rejects that in favor of a unit root.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Return to RATS Procedures

Who is online

Users browsing this forum: No registered users and 0 guests