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: kpss lo robwhittle roblm lobrob gph

Quantlet: 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.

Reference(s):

Usage: KP = rvlm(y{,trunclag})
Input:
y vector, the time series
trunclag vector of truncation lags for the spectral based autocorrelation consistent estimator of the variance (optional). If it is not provided, the default vector of truncation lags used by Kwiatkowski, Phillips, Schmidt and Shin is used.
Output:
KP string vector, a table containing the order of the truncation lag, the rescaled variance statistic and the 95% critical value.

Example:
;Nonstationarity test on the first differences of the 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

Result:
Contents of k

[1,] "   Order  Statistic  Crit. Value "
[2,] "_________________________________"
[3,] ""
[4,] "      0    0.0357    0.1869"
[5,] "      8    0.0399    0.1869"
[6,] "     25    0.0383    0.1869"
Example:
;Nonstationarity test on the first differences of the 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

Result:
Contents of k

[1,] "   Order  Statistic  Crit. Value "
[2,] "_________________________________"
[3,] ""
[4,] "      2    0.0392    0.1869"
[5,] "      4    0.0401    0.1869"
[6,] "      6    0.0400    0.1869"
Example:
;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

Result:
Contents of k
[1,] "   Order  Statistic  Crit. Value "
[2,] "_________________________________"
[3,] ""
[4,] "      2    0.2829 *   0.1869"
[5,] "      4    0.2575 *   0.1869"
[6,] "      6    0.2397 *   0.1869"



Author: G. Teyssiere, 20010720 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006