var_fevd {sovereign}R Documentation

Estimate forecast error variance decomposition

Description

Estimate forecast error variance decomposition for VARs with either short or 'IV-short' structural errors.

Usage

var_fevd(var, horizon = 10, scale = TRUE)

Arguments

var

VAR output

horizon

int: number of periods

scale

boolean: scale variable contribution as percent of total error

Value

long-form data.frame

See Also

VAR()

var_irf()

var_fevd()

var_hd()

RVAR()

rvar_irf()

rvar_fevd()

rvar_hd()

Examples



 # simple time series
 AA = c(1:100) + rnorm(100)
 BB = c(1:100) + rnorm(100)
 CC = AA + BB + rnorm(100)
 date = seq.Date(from = as.Date('2000-01-01'), by = 'month', length.out = 100)
 Data = data.frame(date = date, AA, BB, CC)

 # estimate VAR
  var =
    sovereign::VAR(
      data = Data,
      horizon = 10,
      freq = 'month',
      lag.ic = 'BIC',
      lag.max = 4)

# impulse response functions
var.irf = sovereign::var_irf(var)

# forecast error variance decomposition
var.fevd = sovereign::var_fevd(var)

# historical shock decomposition
var.hd = sovereign::var_hd(var)




[Package sovereign version 1.2.1 Index]