[R] Fwd: Why does impulse response function of VAR starts at zero and not at one?

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Wed Jul 24 17:45:19 CEST 2013


It appeared on the mailing list (https://stat.ethz.ch/pipermail/r-help/2013-July/357190.html ... you have to click on the attachment URL). As did this one. (You are not addressing the moderators... you are addressing the whole list.)

Your question is not well-formed. Please read the Posting Guide. You might benefit from reading http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example as well. (We should be able to run your example and see a sample output that illustrates your problem. You should also post in text format so the HTML does not mangle your code.)

One thing to keep in mind is that this is a list for questions about R, and much less about theory. Questions about contributed packages must mention their name, and keep in mind that list participants may never have encountered that package (there are thousands of them). If a particular package has a bug then you should address the package maintainer (see ?maintainer). If your question turns out to focus on theory, you might be better off asking somewhere like stats.stackexchange.com. Even if your question is well-formed, no one here might know the answer and you could get no response at all, but at least you can make it easy to reproduce the problem in case someone is curious enough to investigate and offer some ideas or corroboration.

On the topic of R, I doubt that the package author intended that you supply vectors of all of the possible options for the type and ic parameters. Most likely, supplying just one of the options for each parameter will obtain best results.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

"José Verhoeven" <jose at memo2.nl> wrote:
>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 at memo2.nl>
>Date: 2013/7/22
>Subject: Why does impulse response function of VAR starts at zero and
>not
>at one?
>To: r-help at 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]]
>
>
>
>------------------------------------------------------------------------
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list