radf | R Documentation |
radf
returns the recursive univariate and panel Augmented Dickey-Fuller test statistics.
radf(data, minw = NULL, lag = 0L)
data |
A univariate or multivariate numeric time series object, a numeric vector or matrix, or a data.frame. The object should not have any NA values. |
minw |
A positive integer. The minimum window size (default =
|
lag |
A non-negative integer. The lag length of the Augmented Dickey-Fuller regression (default = 0L). |
The radf()
function is vectorized, i.e., it can handle multiple series
at once, to improve efficiency. This property also enables the computation of panel
statistics internally as a by-product of the univariate estimations with minimal
additional cost incurred.
A list that contains the unit root test statistics (sequence):
adf |
Augmented Dickey-Fuller |
badf |
Backward Augmented Dickey-Fuller |
sadf |
Supremum Augmented Dickey-Fuller |
bsadf |
Backward Supremum Augmented Dickey-Fuller |
gsadf |
Generalized Supremum Augmented Dickey-Fuller |
bsadf_panel |
Panel Backward Supremum Augmented Dickey-Fuller |
gsadf_panel |
Panel Generalized Supremum Augmented Dickey-Fuller |
And attributes:
mat |
The matrix used in the estimation. |
index |
The index parsed from the dataset. |
lag |
The lag used in the estimation. |
n |
The number of rows. |
minw |
The minimum window used in the estimation. |
series_names |
The series names. |
Phillips, P. C. B., Wu, Y., & Yu, J. (2011). Explosive Behavior in The 1990s Nasdaq: When Did Exuberance Escalate Asset Values? International Economic Review, 52(1), 201-226.
Phillips, P. C. B., Shi, S., & Yu, J. (2015). Testing for Multiple Bubbles: Historical Episodes of Exuberance and Collapse in the S&P 500. International Economic Review, 56(4), 1043-1078.
Pavlidis, E., Yusupova, A., Paya, I., Peel, D., Martínez-García, E., Mack, A., & Grossman, V. (2016). Episodes of exuberance in housing markets: in search of the smoking gun. The Journal of Real Estate Finance and Economics, 53(4), 419-449.
# We will use simulated data that are stored as data
sim_data
rsim <- radf(sim_data)
str(rsim)
# We would also use data that contain a Date column
sim_data_wdate
rsim_wdate <- radf(sim_data_wdate)
tidy(rsim_wdate)
augment(rsim_wdate)
tidy(rsim_wdate, panel = TRUE)
head(index(rsim_wdate))
# For lag = 1 and minimum window = 20
rsim_20 <- radf(sim_data, minw = 20, lag = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.