VAR {vars} | R Documentation |
Estimation of a VAR by utilising OLS per equation.
VAR(y, p = 1, type = c("const", "trend", "both", "none"))
y |
Data item containing the endogenous variables |
p |
Integer for the lag order (default is p=1). |
type |
Type of deterministic regressors to include. |
Estimates a VAR by OLS per equation. The model is of the following form:
y_t = CD_t + A_1 y_{t-1} + ... + A_p y_{t-p} + u_t
where 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, ..., 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
.
A list with class attribute ‘varest
’ holding the
following elements:
varresult |
list of ‘lm ’ objects. |
resid |
A matrix object of the residuals. |
datamat |
The data matrix of the endogenous and explanatory variables. |
y |
The data matrix of the endogenous variables |
type |
A character, specifying the deterministic regressors. |
p |
An integer specifying the lag order. |
K |
An integer specifying the dimension of the VAR. |
obs |
An integer specifying the number of used observations. |
totobs |
An integer specifying the total number of observations. |
restrictions |
Either NULL or a matrix object containing
the zero restrictions of the VAR(p). |
call |
The call to VAR() . |
Bernhard Pfaff
Hamilton, J. (1994), Time Series Analysis, Princeton University Press, Princeton.
Lütkepohl, H. (2006), New Introduction to Multiple Time Series Analysis, Springer, New York.
summary.varest
, plot.varest
,
predict
, irf
, fevd
,
Phi
, Psi
, normality
,
arch
, serial
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")