Learn R Programming

dLagM (version 0.0.8)

dlm: Implement finite distributed lag model

Description

A function that applies distributed lag models with one predictor.

Usage

dlm(x , y , q , show.summary = TRUE)

Arguments

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.

q

An integer representing finite lag length.

show.summary

If TRUE, prints standard model summary for the model of interest.

Value

model

An object of class lm. See the details of href{https://stat.ethz.ch/R-manual/R-devel/library/stats/html/lm.html}{lm} function.

designMatrix

The design matrix composed of transformed z-variables.

Details

When a decision made on a variable, some of the related variables would be effected through time. For example, when income tax rate is increased, this would reduce expenditures of consumers on goods and services, which reduces profits of suppliers, which reduces the demand for productive inputs, which reduces the profits of the input suppliers, and so on (Judge and Griffiths, 2000). These effects occur over the future time periods; hence, they are distributed across the time.

In a distributed-lag model, the effect of an independent variable \(X\) on a dependent variable \(Y\) occurs over the time. Therefore, DLMs are dynamic models. A linear finite DLM with one independent variable is written as follows:

$$ Y_{t} = \alpha +\sum_{s = 0}^{q}\beta_{s}X_{t-s}+\epsilon_{t}, $$

where \(\epsilon_{t}\) is a stationary error term with \(E(\epsilon_{t})=0, Var(\epsilon_{t})=\sigma^{2},Cov(\epsilon_{t},\epsilon_{s})=0\).

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 {
data(warming)
model.dlm = dlm(x = warming$NoMotorVehicles , 
y = warming$Warming , q = 2 ,  show.summary = TRUE)
# }

Run the code above in your browser using DataLab