dLagM (version 1.0.19)

ardlDlm: Implement finite autoregressive distributed lag model

Description

Applies autoregressive distributed lag models of order (p , q) with one predictor.

Usage

ardlDlm(formula = NULL , data = NULL , x = NULL , y = NULL , p = 1 , q = 1 , 
         remove = 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.

Value

model

An object of class lm. See the details of 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.

Details

The autoregressive DLM is a flexible and parsimonious infinite distributed lag model. The model ARDL\((p, q)\) is written as

$$ Y_{t} = \mu+ \beta_{0}X_{t}+\beta_{1}X_{t-1}+\cdots +\beta_{p}X_{t-p}+\gamma_{1}Y_{t-1}+\cdots+\gamma_{q}Y_{t-q}+e_{t}. $$

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.

References

B.H. Baltagi. Econometrics, Fifth Ed. Springer, 2011.

R.C. Hill, W.E. Griffiths, G.G. Judge. Undergraduate Econometrics. Wiley, 2000.

Examples

Run this code
# NOT RUN {
# Only one independent series
data(warming)
model.ardl = ardlDlm(x = warming$NoMotorVehicles, 
                     y = warming$Warming, p = 1 , q = 1 )
summary(model.ardl)

# Remove some lags
# Remove some lags
rem.p = c(0,1) # 0 removes the main effect of X.t
rem.q = c(1,3) 
remove = list(p = rem.p , q = rem.q)
model.ardl = ardlDlm(x = warming$NoMotorVehicles, 
                     y = warming$Warming, p = 2 , q = 3 , remove = remove)
summary(model.ardl)

# To remove intercept as well
rem.q = c(1,3,-1) 
remove = list(p = rem.p , q = rem.q)
model.ardl = ardlDlm(x = warming$NoMotorVehicles, 
                     y = warming$Warming, p = 2 , q = 3 , remove = remove)
summary(model.ardl)

# Multiple independent series
data(M1Germany)
data = M1Germany[1:144,]
model.ardlDlm  = ardlDlm(formula = logprice ~ interest + logm1, 
                         data = data.frame(data) , p = 2 , q = 1 )
summary(model.ardlDlm)

# To remove intercept as well
model.ardlDlm  = ardlDlm(formula = logprice ~ -1 + interest + logm1, 
                         data = data.frame(data) , p = 2 , q = 1 )
summary(model.ardlDlm)

rem.p = list(interest = c(0,2) , logm1 = c(0))
# Remove the main series of interest and logm1 and the secont lag of 
# interest from the model
rem.q = c(1)
remove = list(p = rem.p , q = rem.q)
remove
model.ardlDlm  = ardlDlm(formula = logprice ~ interest + logm1, 
                         data = data.frame(data) , p = 2 , q = 2 , 
                         remove = remove)
summary(model.ardlDlm) 
# }

Run the code above in your browser using DataLab