Description Usage Arguments Details Value
View source: R/VAR-2-estimation.R
Perform multivariate OLS on a set of observables. Creation of lags for the VAR will be handled by the function.
1 |
Y |
A |
p |
An integer scalar. The lag length of the VAR(p) system. |
const |
A boolean scalar, indicating wether a constant should be
included. Defaults to |
This routine applies equation-wise OLS to a VAR. It is equivalent to running
OLS with p
lags for each of the variables and collecting the coefficients
and residuals in a matrix.
A list with four elements:
BETA.hat
is a (K x [K * p + 1])
or (K x [K * p])
named matrix
containing the coefficient estimates. Its dimension depends on wether a
constant is included. Each column contains the coefficents for a particular
regressor, each row corresponds to a single equation. If Y
did not
carry names, the variables will be named y1 and counting. The names of
the lagged regressors are derived by appending the variable name with a
.l1 for lag one etc.
If a constant is included, its coefficients are in the first column.
SIGMA.hat
is a (K x K)
named matrix. It is the covariance matrix of the
residuals. The columns and rows are named after the variables in Y
.
U.hat
is a (K x N)
matrix of residuals. Its rows are named after the
variables, too.
std.err
is a matrix of the same dimension and naming scheme as
BETA.hat
. It carries the standard errors of the coefficient estimates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.