Library: | times |
See also: | adf rvlm lo robwhittle roblm lobrob gph sclmtest neweywest |
Macro: | kpss | |
Description: |
Calculation of the KPSS statistics for I(0) against long-memory
alternatives. We consider the two tests, denoted by KPSS_mu and KPSS_t,
and respectively based on a regression on a constant mu, and
on a constant and a time trend t.
The quantlet returns the value of the estimated statistic for two
type of the tests, i.e., const or trend and
the critical values for a 10, 5 and 1
percent confidence interval for I(0) (const, trend).
|
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 | 0 or 1, a text output is shown in the XploRe output window if output = 1 | |
Output: | ||
kp | vector, KPSS statistics KPSS_mu and KPSS_t | |
critvalue | matrix, critic. values for 10% (1. row), 5% (2. rows) and 1% (3. row) for the kpss test with a constant (1. col) and with a constant and linear trend (2. col) |
;Non-stationarity test on the series dmus58.dat. library("times") x = read("dmus58.dat") ; 25477 obs: log FX rates x = x[1:1000] k=kpss(x,0,1) k
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 k.kp [1,] 77.702 [2,] 11.117 Contents of k.critvalue [1,] 0.347 0.119 [2,] 0.463 0.146 [3,] 0.739 0.216
Library: | times |
See also: | adf rvlm lo robwhittle roblm lobrob gph sclmtest neweywest |