Library: | times |
See also: | rvlm kpss robwhittle roblm lobrob gph neweywest |
Quantlet: | lo | |
Description: | Calculation of the Lo statistic for long-range dependence. |
Usage: | Qn = lo(y{,trunclag}) | |
Input: | ||
y | vector, the time series | |
trunclag | vector of truncation lags for the autocorrelation consistent variance estimator (optional). If this argument is missing, the vector of truncation lags is set to m = 5, 10, 25, 50. | |
Output: | ||
Qn | string vector containing the estimated statistic with its corresponding order. If the estimated statistic is outside the interval (0.809, 1.862), which is the 95 percent confidence interval for no long-memory, a star symbol * is displayed in the third column. The other critical values are in Lo's paper. |
;detection of the existence of long-memory in the volatility ;Since no optional argument is provided, Lo statistic is calculated ;for the expansion orders 5, 10, 25, 50. Since for the orders 5 and 10, ;the statistic is outside the 95 percent confidence interval for no ;long-memory, a star is displayed after the statistic. library("times") x = read("dmus58.dat") x = x[1:2000] y = abs(tdiff(x)) q = lo(y) q
Contents of q [1,] " Order Statistic" [2,] "__________________ " [3,] "" [4,] " 5 2.0012 *" [5,] " 10 1.8741 *" [6,] " 25 1.7490 " [7,] " 50 1.6839 "
;detection of the existence of long-memory in the volatility ;In this case, the Lo statistic is calculated for the expansion ;orders 10, 15, and 20, which are provided as second arguments ;of the quantlet. Since the statistic is outside the 95 percent ;confidence interval for no long-memory, for the order 10, a ;star is displayed after the statistic. library("times") x = read("dmus58.dat") x = x[1:2000] y = abs(tdiff(x)) m = #(10,15,20) q = lo(y,m) q
Contents of q [1,] " Order Statistic" [2,] "__________________ " [3,] "" [4,] " 10 1.8741 *" [5,] " 15 1.8065 " [6,] " 20 1.7744 "