Learn R Programming

MultiATSM (version 1.4.0)

VAR: Estimates a standard VAR(1)

Description

Estimates a standard VAR(1)

Usage

VAR(RiskFactors, VARtype, Bcon_Mat = NULL)

Value

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

Arguments

RiskFactors

A numeric matrix (F x T) representing the time series of risk factors.

VARtype

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

Bcon_Mat

Constraints matrix (F+1 x N), which includes an intercept. Entries containing NAs are treated as free parameters.
Default is set to NULL.

Examples

Run this code
data("CM_Factors")
# Example 1: unconstrained case
VAR(RiskFactors, VARtype= 'unconstrained')

# Example 2: constrained case
K <- nrow(RiskFactors)
Bcon_Mat <- matrix(0, nrow = K, ncol = K+1)
Bcon_Mat[ , 1:3] <- NaN
VAR(RiskFactors, VARtype= 'constrained', Bcon_Mat)

Run the code above in your browser using DataLab