detrend.recursively: Detrending the data recursively

View source: R/ADF.test.S.R

detrend.recursivelyR Documentation

Detrending the data recursively

Description

This procedure is aimed to provide a recursively detrended series. More or less classical approach of full-sample detrending may lead to the regressors correlated with the error term.

Usage

detrend.recursively(y, x, c, gamma, trim)

Arguments

y

A time series of interest.

x

A matrix of explanatory variables.

c

A filtration parameter used to construct an autocorrelation coefficient.

gamma

A detrending type selection parameter. If 0 the OLS detrending is applied, if 1 the GLS detrending is applied, otherwise the autocorrelation coefficient is calculated as 1 + c^{\gamma} T^{-\gamma}.

trim

A trimming parameter. It's used to find the minimum size of subsamples while calculating recursive estimates. The ending point of the subsample for the t is max(t, trim \times T).

Details

Elliott et al (1996) recommend using c = -7 for the model with only an intercept, and c = -13.5 for the model with a linear trend.

Value

A detrended series.

References

Elliott, Graham, Thomas J. Rothenberg, and James H. Stock. “Efficient Tests for an Autoregressive Unit Root.” Econometrica 64, no. 4 (1996): 813–36. https://doi.org/10.2307/2171846.

Taylor, A. M. Robert. “Regression-Based Unit Root Tests With Recursive Mean Adjustment for Seasonal and Nonseasonal Time Series.” Journal of Business & Economic Statistics 20, no. 2 (April 2002): 269–81. https://doi.org/10.1198/073500102317352001.


d9d6ka/RANEPA-R documentation built on May 4, 2024, 7:11 a.m.