Description Usage Arguments Value See Also Examples
Estimate historical decomposition for VARs with either short or 'IV-short' structural errors.
1 |
var |
VAR output |
long-from data.frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.