ols_mv: Multivariate ordinary least squares for VARs

Description Usage Arguments Details Value

View source: R/VAR-2-estimation.R

Description

Perform multivariate OLS on a set of observables. Creation of lags for the VAR will be handled by the function.

Usage

1
ols_mv(Y, p, const = TRUE)

Arguments

Y

A (K x N+p) matrix carrying the data for estimation. There are N observations for each of the K variables with p pre-sample values.

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 TRUE.

Details

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.

Value

A list with four elements:


nielsaka/zeitreihe documentation built on March 17, 2020, 8:38 p.m.