ADF.test | R Documentation |
A function for ADF test with the ability to select the number of lags. Lags are selected by informational criterions which can be modified as in Ng and Perron (2001) and Cavaliere et al. (2015).
ADF.test(
y,
const = TRUE,
trend = FALSE,
max.lag = 0,
criterion = NULL,
modified.criterion = FALSE,
rescale.criterion = FALSE
)
y |
A time series of interest. |
const , trend |
Whether a constand and trend are to be included. |
max.lag |
Maximum lag number. |
criterion |
A criterion used to select number of lags. If lag selection is not needed keep this NULL. |
modified.criterion |
Whether the unit-root test modificaton is needed. |
rescale.criterion |
Whether the rescaling informational criterion is needed. Designed to cope with heteroscedasticity in residuals. |
Due to the Frisch-Waugh-Lovell theorem we first detrend y
and then apply
the test to the detrended series.
A list containing:
y,
const,
trend,
residuals,
coefficient estimates,
t-statistic value,
critical value,
Number of lags,
indicator of stationarity.
Cavaliere, Giuseppe, Peter C. B. Phillips, Stephan Smeekes, and A. M. Robert Taylor. “Lag Length Selection for Unit Root Tests in the Presence of Nonstationary Volatility.” Econometric Reviews 34, no. 4 (April 21, 2015): 512–36. https://doi.org/10.1080/07474938.2013.808065.
Ng, Serena, and Pierre Perron. “Lag Length Selection and the Construction of Unit Root Tests with Good Size and Power.” Econometrica 69, no. 6 (2001): 1519–54. https://doi.org/10.1111/1468-0262.00256.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.