sim_var: Simulate VAR

Description Usage References See Also Examples

View source: R/simulate_var.R

Description

Simulate VAR

Usage

1
sim_var(Acoef, innov = NULL, varcov = NULL, nrep = 200)

References

https://github.com/MatthieuStigler/tsDyn/blob/a6aa2ebc041e448b3eb8598ffd117a83cfe316e5/tsDyn/R/VAR.sim.R

See Also

mlvar::simulateVAR tsDyn::VAR.sim

Examples

1
2
3
4
5
6
7
8
9
obj <- varm(varm::spec(econdata::sw2001[,-1], .endo_lags = 4))
Acoef <- coefficients(obj)
set.seed(123)
dyn <- tsDyn:::VAR.sim(t(Acoef), n = 200, lag = 4, include = "const")
plot.ts(dyn)
set.seed(123)
ab <- gen_var(Acoef, nrep = 200)
plot.ts(ab)
waldo::compare(dyn, ab)

kvasilopoulos/abvar documentation built on April 27, 2021, 6:38 a.m.