Library: | times |
See also: | kpss lo robwhittle roblm lobrob gph sclmtest |
Macro: | rvlm | |
Description: | Calculation of the rescaled variance test for I(0) against long-memory alternatives. The statistic is the centered kpss statistic based on the deviation from the mean. The limit distribution of this statistic is a Brownian bridge whose distribution is related to the distribution of the Kolmogorov statistic. This statistic can also be used for detecting long-memory in ARCH models. The first argument of the quantlet is the series, the second optional argument is the vector of truncation lags for the spectral based autocorrelation consistent estimator of the variance. If this optional argument is not provided, the default vector of truncation lags used by Kwiatkowski, Phillips, Schmidt and Shin is used. The quantlet returns the order of the truncation lag, the rescaled variance statistic, with the 95% critical value. |
Usage: | k = rvlm(y{,m}) | |
Input: | ||
y | vector | |
Output: | ||
m vector | ||
k | vector |
;Nonstationarity test on the differenced series dmus58.dat. Since the evaluated ;statistics are below the critical value for I(0), for all the ;truncation orders, we accept the null hypothesis that the series is I(0). ;Thus the level series is I(1) library("times") x = read("dmus58.dat") ; 25477 obs: log FX rates x = tdiff(x[1:2000]) k = rvlm(x) ; k
Contents of k [1,] " Order Statistic Crit. Value " [2,] "_________________________________" [3,] "" [4,] " 0 0.0383 0.1869" [5,] " 8 0.0428 0.1869" [6,] " 25 0.0411 0.1869"
;Nonstationarity test on the differenced series dmus58.dat. ;Here, the user is providing the optional vector of truncation lags. ;Since the evaluated statistics are below the critical value for I(0), for all the ;truncation orders, we accept the null hypothesis that the series is I(0). ;Thus the level series is I(1) library("times") x = read("dmus58.dat") ; 25477 obs: log FX rates x = tdiff(x[1:2000]) m = #(2,4,6) k = rvlm(x,m) ; k
Contents of k [1,] " Order Statistic Crit. Value " [2,] "_________________________________" [3,] "" [4,] " 2 0.0420 0.1869" [5,] " 4 0.0430 0.1869" [6,] " 6 0.0429 0.1869"
;Long-memory test on the series of absolute returns. ;Here, the user is providing the optional vector of truncation lags. ;Since the evaluated statistics are over the critical value for I(0), for all the ;truncation orders, a * is displayed after the statistic, and we accept the ;alternative hypothesis that the series of absolute returns display ;long memory. library("times") x = read("dmus58.dat") ; 25477 obs: log FX rates x = abs(tdiff(x[1:2000])) m = #(2,4,6) k = rvlm(x,m) ; k
Contents of k [1,] " Order Statistic Crit. Value " [2,] "_________________________________" [3,] "" [4,] " 2 1.5623 * 0.1869" [5,] " 4 1.4222 * 0.1869" [6,] " 6 1.3237 * 0.1869"
Library: | times |
See also: | kpss lo robwhittle roblm lobrob gph sclmtest |