{smcl} {* 26jun2006}{...} {hline} help for {hi:lomodrs} (SSC distribution 26 Jun 2006) {hline} {title:Lo Modified R/S test for long range dependence in timeseries} {p 8 17}{cmd:lomodrs} {it:varname} [{cmd:if} {it:exp}] [{cmd:in} {it:range}] [{cmd:,} {cmdab:maxlag(}{it:#}{cmd:)}] {p 4 4}{cmd:lomodrs} is for use with time-series data. You must {cmd:tsset} your data before using {cmd:lomodrs}; see help {cmd:tsset}. {cmd:lomodrs} supports the {cmd:by} prefix, which may be used to operate on each time series in a panel. Alternatively, the {cmd:if} qualifier may be used to specify a single time series in a panel. {p 4 4} {it:varname} may contain time-series operators; {cmd:help varlist}.{p_end} {title:Description} {p 4 4}{cmd:lomodrs} performs Lo's (1991) modified rescaled range (R/S, "range over standard deviation") test for long range dependence of a time series. The classical R/S test, devised by Hurst (1951) and Mandelbrot (1972), is shown to be excessively sensitive to "short-range dependence" (e.g. ARMA components). Lo's modified version of the statistic takes account of short-range dependence by performing a Newey-West correction (using a Bartlett window) to derive a consistent estimate of the long-range variance of the timeseries.{p_end} {p 4 4} Inference from the modified R/S test for long range dependence is complementary to that derived from that of other tests for long memory, or fractional integration in a timeseries, such as {cmd:kpss}, {cmd:gphudak}, {cmd:modlpr} and {cmd:roblpr}. {p_end} {p 4 4} The maximum lag order for the test is by default calculated from the sample size and the first-order autocorrelation coefficient of the {it:varname} using the data-dependent rule of Andrews (1991), assuming that the dgp is AR(1). The maximum lag order may be specified with the {it:maxlag} option. If it is set to zero, the test performed is the classical Hurst-Mandelbrot rescaled-range statistic. {p_end} {p 4 4} Critical values for the test are taken from Lo, 1991, Table II. {p_end} {p 4 4} The test statistic and number of observations are placed in the return array. {p_end} {title:Options} {p 4 4} {cmdab:maxlag(}{it:#}{cmd:)} specifies the maximum lag order to be used in calculating the test. If omitted, the maximum lag order is calculated as described above. {p_end} {title:Examples} {p 4 8}{stata "use http://fmwww.bc.edu/ec-p/data/Mills2d/sp500a.dta":. use http://fmwww.bc.edu/ec-p/data/Mills2d/sp500a.dta}{p_end} {p 4 8}{stata "lomodrs sp500ar":. lomodrs sp500ar}{p_end} {p 4 8}{stata "lomodrs sp500ar, max(0)":. lomodrs sp500ar, max(0)}{p_end} {p 4 8}{stata "lomodrs sp500ar if tin(1946,)":. lomodrs sp500ar if tin(1946,)}{p_end} {title:Authors} {p 4 4}Christopher F. Baum, Boston College, USA{break} baum@bc.edu {p 4 4}Tairi Room, Boston College, USA{break} {title:References} {p} Andrews, D. Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimation. Econometrica, 59, 1991, 817-858.{p_end} {p} Hurst, H. Long Term Storage Capacity of Reservoirs. Transactions of the American Society of Civil Engineers, 116, 1951, 770-799.{p_end} {p} Lo, Andrew W. Long-Term Memory in Stock Market Prices. Econometrica, 59, 1991, 1279-1313.{p_end} {p} Mandelbrot, B. Statistical Methodology for Non-Periodic Cycles: From the Covariance to R/S Analysis. Annals of Economic and Social Measurement, 1, 1972, 259-290.{p_end} {title:Also see} {p 4 13}On-line: {help regress}, {help time}, {help tsset}, {help ac}, {help corrgram}; {help gphudak} (if installed), {help modlpr} (if installed), {help kpss} (if installed) {p_end}