| ardlDlm | R Documentation | 
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 )
formula | 
 A   | 
data | 
 A   | 
x | 
 A vector including the observations of predictor time series. This is not restricted to   | 
y | 
 A vector including the observations of dependent time series. This is not restricted to   | 
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   | 
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   | 
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.
model | 
 An object of class   | 
order | 
 A vector composed of   | 
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   | 
Haydar Demirhan
Maintainer: Haydar Demirhan <haydar.demirhan@rmit.edu.au>
B.H. Baltagi. Econometrics, Fifth Ed. Springer, 2011.
R.C. Hill, W.E. Griffiths, G.G. Judge. Undergraduate Econometrics. Wiley, 2000.
# Only one independent series
data(seaLevelTempSOI)
model.ardl = ardlDlm(x = seaLevelTempSOI$LandOcean,  
                     y = seaLevelTempSOI$GMSL, p = 1 , q = 1 )
summary(model.ardl)
# residuals(model.ardl)
# coef(model.ardl)
# fitted(model.ardl)
# 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 = seaLevelTempSOI$LandOcean,  
                     y = seaLevelTempSOI$GMSL, 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 = seaLevelTempSOI$LandOcean,  
                     y = seaLevelTempSOI$GMSL, 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) 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.