José Verhoeven
2013-Jul-22 13:31 UTC
[R] Why does impulse response function of VAR starts at zero and not at one?
Hi there, I have estimated a bivariate VAR model (with series x1 and x2 as endogenous variables): y=cbind(x1,x2) z=cbind(d1,d2,d3,d4,d5,d6,d7,d8,d9) # some dummy variables model<-VAR(y, p = 3, type = c("const", "trend", "both", "none"), season = NULL, exogen = z, lag.max = NULL, ic = c("AIC", "HQ", "SC", "FPE")) and I have plotted the cumulative impulse response function with: impulseresponse<-irf(lagmodel, impulse = "x2", response = "x1", n.ahead 400, ortho = TRUE, cumulative = TRUE, boot = FALSE) plot(impulseresponse) Now as the impulse response function shows the effect on e.g. x1 of a unit shock in x2 I expect the value at t=0 to be at or around one (depending on whether there is an interscept in the model). Why then, does all impulse response plots I get start at zero? I really hope someone can help me out! Thanks in advance. Jose [[alternative HTML version deleted]]
José Verhoeven
2013-Jul-24 14:07 UTC
[R] Fwd: Why does impulse response function of VAR starts at zero and not at one?
Hi there, I sent this e-mail two days ago, but I did not see it pass by the R-help mailinglist and I was wondering if you could post it or is there a que? Thanks in advance. Kind regards, Jose ---------- Forwarded message ---------- From: José Verhoeven <jose@memo2.nl> Date: 2013/7/22 Subject: Why does impulse response function of VAR starts at zero and not at one? To: r-help@r-project.org Hi there, I have estimated a bivariate VAR model (with series x1 and x2 as endogenous variables): y=cbind(x1,x2) z=cbind(d1,d2,d3,d4,d5,d6,d7,d8,d9) # some dummy variables model<-VAR(y, p = 3, type = c("const", "trend", "both", "none"), season = NULL, exogen = z, lag.max = NULL, ic = c("AIC", "HQ", "SC", "FPE")) and I have plotted the cumulative impulse response function with: impulseresponse<-irf(lagmodel, impulse = "x2", response = "x1", n.ahead 400, ortho = TRUE, cumulative = TRUE, boot = FALSE) plot(impulseresponse) Now as the impulse response function shows the effect on e.g. x1 of a unit shock in x2 I expect the value at t=0 to be at or around one (depending on whether there is an interscept in the model). Why then, does all impulse response plots I get start at zero? I really hope someone can help me out! Thanks in advance. Jose [[alternative HTML version deleted]]