Learn R Programming

vars (version 1.1-9)

VAR: Estimation of a VAR(p)

Description

Estimation of a VAR by utilising OLS per equation.

Usage

VAR(y, p = 1, type = c("const", "trend", "both", "none"),
season = NULL, exogen = NULL, lag.max = NULL,
ic = c("AIC", "HQ", "SC", "FPE"))

Arguments

y
Data item containing the endogenous variables
p
Integer for the lag order (default is p=1).
type
Type of deterministic regressors to include.
season
Inlusion of centered seasonal dummy variables (integer value of frequency).
exogen
Inlusion of exogenous variables.
lag.max
Integer, determines the highest lag order for lag length selection according to the choosen ic.
ic
Character, selects the information criteria, if lag.max is not NULL.

Value

  • A list with class attribute varest holding the following elements:
  • varresultlist of lm objects.
  • datamatThe data matrix of the endogenous and explanatory variables.
  • yThe data matrix of the endogenous variables
  • typeA character, specifying the deterministic regressors.
  • pAn integer specifying the lag order.
  • KAn integer specifying the dimension of the VAR.
  • obsAn integer specifying the number of used observations.
  • totobsAn integer specifying the total number of observations.
  • restrictionsEither NULL or a matrix object containing the zero restrictions of the VAR(p).
  • callThe call to VAR().

encoding

latin1

concept

  • VAR
  • Vector autoregressive model
  • VAR

Details

Estimates a VAR by OLS per equation. The model is of the following form: $$\bold{y}_t = A_1 \bold{y}_{t-1} + \ldots + A_p \bold{y}_{t-p} + CD_t + \bold{u}_t$$ where $\bold{y}_t$ is a $K \times 1$ vector of endogenous variables and $u_t$ assigns a spherical disturbance term of the same dimension. The coefficient matrices $A_1, \ldots, A_p$ are of dimension $K \times K$. In addition, either a constant and/or a trend can be included as deterministic regressors as well as centered seasonal dummy variables and/or exogenous variables (term $CD_T$, by setting the type argument to the corresponding value and/or setting season to the desired frequency (integer) and/or providing a matrix object for exogen, respectively. The default for type is const and for season and exogen the default is set to NULL. If for lag.max an integer value is provided instead of NULL (the default), the lag length is determined by the selected information criteria in ic, the default is Akaike.

References

Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton. L�tkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.

See Also

summary, plot, coef, residuals, fitted, predict, irf, fevd, Phi, Psi, normality, arch, serial, VARselect, logLik

Examples

Run this code
data(Canada)
VAR(Canada, p = 2, type = "none")
VAR(Canada, p = 2, type = "const")
VAR(Canada, p = 2, type = "trend")
VAR(Canada, p = 2, type = "both")

Run the code above in your browser using DataLab