Implement finite autoregressive distributed lag model
Implement finite autoregressive distributed lag model
Applies autoregressive distributed lag models of order (p , q) with one predictor.
ardlDlm(formula =NULL, data =NULL, x =NULL, y =NULL, p =1, q =1, remove =NULL, type =NULL)
Arguments
formula: A formula object for the model to be fitted. In the case of multiple predictor series, the model should be entered via a formula object.
data: A data.frame including all dependent and independent series. In the case of multiple predictor series, the data should be entered via the data argument.
x: A vector including the observations of predictor time series. This is not restricted to ts objects.
y: A vector including the observations of dependent time series. This is not restricted to ts objects.
p: An integer representing finite lag length.
q: An integer representing the order of autoregressive process.
remove: A list object having two elements showing the lags of independent series with p and the autoregressive lags with q to be removed from the full model for each independent series. Please see the details for the construction of this argument.
type: An integer taking 1 if only x and y vectors are entered, 2 if a formula and data matrix is entered. It can be left NULL since the correct value is checked and fixed by the code.
Details
The autoregressive DLM is a flexible and parsimonious infinite distributed lag model. The model ARDL(p,q) is written as
When there is only one predictor series, both of model and formula objects can be used. But when they are supplied, both x and y arguments should be NULL.
The variable names in formula must match with the names of variables in data argument and it must be in the form of a generic formula for R functions.
The argument data contains dependent series and independent series.
The argument remove = list(p = list() , q = c()) is used to specify which lags of each independent series and the autoregressive lags of dependent series will be removed from the full model. Each element of the list p shows particular lags that will be removed from each independent series. To remove the main series from the model or to fit a model ARDL(0,q), include 0 within the elements of p. The element q is just a vector showing the autoregressive lags of dependent series to be removed.
To remove the intercept from the model, if a formula is entered, just include "-1" in the model formula. Otherwise, include "-1" in the element q of the list remove. See the examples below for implementation details.
The standard function summary() prints model summary for the model of interest.
Returns
model: An object of class lm. See the details of list("lm") function.
order: A vector composed of p and q orders.
removed.p: A list or vector showing the lags of independent series to be removed from the full model.
removed.q: A vector showing the autoregressive lags to be removed from the full model.
formula: Model formula of the fitted model. This is returned if multiple independent series are entered.
data: A data.frame including all dependent and independent series. This is returned if multiple independent series are entered.