Learn R Programming

vars (version 0.1.7)

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"))

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.

Value

  • A list with class attribute varest holding the following elements:
  • varresultlist of lm objects.
  • residA matrix object of the residuals.
  • 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 = CD_t + A_1 \bold{y}_{t-1} + \ldots + A_p \bold{y}_{t-p} + \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 (term $CD_T$, by setting the type argument to the corresponding value. The default is const.

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.varest, plot.varest, predict.varest

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