Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • What does " Set the active IRF file" mean?

    Dear all,
    In calculating the Impulse response functions I type in

    irf create irf, set(myname)

    I am not sure what set means in this context. The Stata interpetation is "Set the active IRF file" but I can not understand this explanation. Does it create an irf file which is assigned the name "myme"?

    Thank you
    Last edited by John Andrews; 17 Dec 2019, 19:45.

  • #2
    Reading the output of help irf create we see that the set option on the irf create command performs the same function as the irf set command. If it does not already exist, irs set or the set() option on irf create will create an irf file with the name myname.irf, and in any event will make myname.irf the "active irf file". For the irf commands, the idea is to set an "active irf file" once and the subsequent irf commands use that file to store and retrieve results. It saves having to specify an irf file name on every irf command.

    The Stata Time Series Reference Manual PDF included in your Stata installation and accessible from Stata's Help menu documents the irf commands more fully than the help output. If you are new to irf, it will be worth your time to start there rather than with the help output. The following Quick Start example is included in the irf entry in the PDF.
    Fit a VAR model
    Code:
    var y1 y2 y3
    Create impulse–response function myirf and IRF file myirfs.irf
    Code:
    irf create myirf, set(myirfs)
    Graph orthogonalized impulse–response function for dependent variables y1 and y2 given a shock to y1
    Code:
    irf graph oirf, impulse(y1) response(y1 y2)
    As above, but present results in a table
    Code:
    irf table oirf, impulse(y1) response(y1 y2)

    Note that having created the irf model "myirf" in the irf file "myirfs.irf" which is now the "active irf file", the irf graph and irf table commands do not need to be told what file the irf result set is stored in.

    Comment

    Working...
    X