Hello,
I try to impose a negative shock to my VAR, SVAR model. I wonder how I can do that with the irf() command
Here are my codes for calculating the IRFs from a VAR model:
y <- ts(grouproject$lnynewhp, start = c(2015, 01), frequency = 4)
c <- ts(grouproject$lnchp, start = c(2015, 01), frequency = 4)
gc <- ts(grouproject$lngchp, start = c(2015, 01), frequency = 4)
gi <- ts(grouproject$lngihp, start = c(2015, 01), frequency = 4)
gs <- gc + gi
Y <-cbind(y,gs,c)
VAR <- VAR(Y, p = 1, type = "const")
var_irf <- irf(VAR, impulse = "gs", response = "y", n.ahead = 16,boot = TRUE, runs = 1000, ci=0.95)
plot(var_irf)