Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: times
See also: adf rvlm lo robwhittle roblm lobrob gph neweywest

Quantlet: kpss
Description: Calculation of the KPSS statistics for I(0) against long-memory alternatives. We consider two tests, denoted by KPSS_mu and KPSS_t based on a regression on a constant mu, and on a constant and a time trend t, respectively. The quantlet returns the value of the estimated statistic for the two tests, i.e., const or trend and the critical values for a 10, 5 and 1 percent confidence interval for I(0) (const, trend).

Reference(s):

Link:
Usage: {kp, critvalue} = kpss(y {,t {,output}})
Input:
y vector
t scalar, truncation lag for the autocorrelation consistent variance estimator, if t is not specified, the KPSS statistic is calculated for t=0, 7 and 21
output a summary table is shown if "output" is non-zero
Output:
kp vector, KPSS statistics KPSS_mu and KPSS_t
critvalue matrix, critical values for 10% (first row), 5% (second row) and 1% (third row) for the KPSS test with a constant (first col) and with a constant and linear trend (second col)

Example:
;Non-stationarity test on the series dmus58.dat.
func("acf")
func("neweywest")
func("kpss")
x = read("dmus58.dat") ; 25477 obs: log FX rates
x = x[1:1000]
{kp, critvalue} = kpss(x,0,1)
kp
critvalue

Result:
Contents of kpss

[1,] "   Order   Test   Statistic          Crit. Value       "
[2,] "                                  0.1   0.05   0.01    "
[3,] "_______________________________________________________"
[4,] "       0  const      77.702     0.347  0.463  0.739    "
[5,] "       0  trend      11.117     0.119  0.146  0.216    "

Contents of kp

[1,]   77.702
[2,]   11.117

Contents of critvalue

[1,]    0.347    0.119
[2,]    0.463    0.146
[3,]    0.739    0.216



Author: T. Kleinow, G. Teyssiere, 20010716
(C) MD*TECH Method and Data Technologies, 05.02.2006