MR_test: LM test against a change in persistence

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/MR_test.R

Description

This function performs a LM-type test for a change in persistence as suggested by Martins and Rodrigues (2014). Under the null hypothesis the memory parameter d is constant over the sample. Under the alternative an increase or a decrease of the memory parameter has occured over time.

Usage

1
2
3
MR_test(x, trend = c("none", "linear"), tau = 0.2,
  statistic = c("squared", "standard"), simu = 0, M = 10000,
  serial = c(FALSE, TRUE))

Arguments

x

the univariate numeric vector to be investigated. Missing values are not allowed.

trend

whether the time series exhibits a trend, "none" implies no trend and "linear" implies a linear trend.

tau

the function tests in the interval [T*tau,T*(1-tau)] for a break in persistence with T being the length of the time series. It must hold that 0<tau<0.5, default is tau=0.2 as commonly used in the literature. Note that if T*tau<=2 the test statistic cannot be calculated.

statistic

which type of test statistic should be used, "squared" for the squared t-statistic and "standard" for the standard t-test. Default is statistic="squared".

simu

whether critical values should be simulated or interpolated, simu=1 means simulation, simu=0 means interpolation. See details. Default is simu=0.

M

number of replications in case critical values should be simulated. Default is M=10000.

serial

boolean, indicating whether to account for serial correlation of the errors. Default is serial=FALSE implying no correction for serial correlation.

Details

The critical values of the tests vary with sample size and memory parameter d. If simu=0, the critical values provided are based on linear interpolation of the critical values simulated by Martins and Rodrigues (2014). These are, however, only valid for tau=0.2 and serial=FALSE. In case that non-default values are chosen for tau or serial, it is recommended to set simu=1 which means that critical values are simulated based on the given data using M replications. Caution, for a time series of length T=750 and M=10,000 replications this takes approximately twelve hours with increasing duration for higher T or M. It should be noted, however, that M smaller than 10,000 make the results unreliable.

Value

Returns a matrix that consists of test statistic and critical values (corresponding to alpha=0.1,0.05,0.01) for testing against an increase in memory, against a decrease in memory, and against a change in an unknown direction.

Author(s)

Janis Becker

References

Martins, L.. and Rodrigues, P. (2014): Testing for persistence change in fractionally integrated models: An application to world inflation rates. Computational Statistics and Data Analysis, 76, pp. 502-522.

See Also

cusum_test, LBI_test, LKSN_test, ratio_test.

Examples

1
2
3
4
5
6
7
set.seed(410)

# generate dummy-data
series <- c(rnorm(200), cumsum(rnorm(200)))

# test for a break in persistence
MR_test(series, trend="none", statistic="squared")

memochange documentation built on July 27, 2020, 1:09 a.m.