Learn R Programming

MultiATSM (version 0.3.6)

VAR: Estimates a VAR(1)

Description

Estimates a VAR(1)

Usage

VAR(RiskFactors, VARtype, Bcon = NULL)

Value

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

Arguments

RiskFactors

matrix containing all the risk factors (K x T)

VARtype

string-vector which accommodates two possibilities: 'unconstrained' or 'constrained'

Bcon

constraints matrix (K+1 x N) - should contain an intercept. IfBcon(i,j) = nan --> B(i,j) is a free parameter.
Default is set to NULL.

Examples

Run this code
data("CM_Factors")
#Example 1
VAR(RiskFactors, VARtype= 'unconstrained')
#Example 2
K <- nrow(RiskFactors)
Bcon <-matrix(0, nrow = K, ncol = K+1)
Bcon[,1:3] <- NaN
VAR(RiskFactors, VARtype= 'constrained', Bcon)


Run the code above in your browser using DataLab