VAR function

Estimates a standard VAR(1)

Estimates a standard VAR(1)

VAR(RiskFactors, VARtype, Bcon = NULL)

Arguments

  • RiskFactors: A numeric matrix (FTx T) representing the time series of risk factors.

  • VARtype: String vector with two possible values: 'unconstrained' or 'constrained'.

  • Bcon: Constraints matrix (F+1 x N), which includes an intercept. If Bcon(i,j) = NA, then B(i,j) is treated as a free parameter.

    Default is set to NULL.

Returns

intercept, feedback matrix and the variance-covariance matrix of a VAR(1)

Examples

data("CM_Factors") # Example 1: unconstrained case VAR(RiskFactors, VARtype= 'unconstrained') # Example 2: constrained case K <- nrow(RiskFactors) Bcon <- matrix(0, nrow = K, ncol = K+1) Bcon[ , 1:3] <- NaN VAR(RiskFactors, VARtype= 'constrained', Bcon)
  • Maintainer: Rubens Moura
  • License: GPL-2 | GPL-3
  • Last published: 2025-03-24