Announcement

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

  • Impulse Response after a panel VAR estimation WITH CONSTRAINTS

    Hello all
    I am trying to graph the Impulse Response Coefficients after estimating a panel VAR.
    My questions is how to do that while imposing restrictions on some of the VAR coefficients ?

    I used the following without restrictions (Note that pvar estimates panel VAR and pvarirf graphs the IRF after pvar)
    Code:
    pvar abn si tg lp ht , lags(1)
    pvarirf, step(10) impulse(abn) response(si)
    pvarirf, step(10) impulse(tg) response(si)
    I tried to define some restrictions and apply them on the VAR however
    Code:
    pvar
    does not seem to accept constraints ?

    Code:
    constraint 1 [abn]ht= 0
    constraint 2 [tg]ht= 0
    constraint 2 [lp]abn = 0
    
    pvar abn si tg lp ht , lags(1) constraints (1/3)
    pvarirf, step(10) impulse(abn) response(si)
    pvarirf, step(10) impulse(tg) response(si)
    I get an error message that option constraints () is not allowed.

    I am using stata 11, can anyone help with this please?

  • #2
    pvar is from Stata Journal as you are asked to explain. (FAQ Advice #12 asks for explanation of user-written programs you refer to.)

    I've never used it, but a glance at its syntax gives this


    Code:
    /* pVAR v1.0 - 22 June 2016*/
    
    
    capture program drop pvar
    program define pvar, sortpreserve eclass // --------------------
       version 11.0
       #delimit ;
       syntax varlist(min=2 numeric) [if] [in] [,
          LAgs(integer 1)
          EXog(varlist ts)
          FOD
          FD
          TD
          INSTLags(string)
          GMMStyle
          GMMOpts(string)
          VCE(string)
          OVERID
          Level(cilevel)
          NOPrint
          ] ;
       #delimit cr
    -- which unfortunately for you just confirms what you have already been told, namely that the command doesn't support a constraints() option.

    Sorry, I can't tell you anything else; I don't even know whether your desire makes sense in this framework.

    Comment


    • #3
      Thanks for your reply Nick.
      But is there any other way to estimate a panel VAR with constraints and then graph the IRFs?
      Thanks

      Comment


      • #4
        I wasn't exaggerating when I said "I can't tell you anything else", although presumably you're directing the question generally.

        Comment


        • #5
          Dear all
          I hope if some participants can share their ideas. I think this is a common situation that other might have faced while estimating a panel VAR.
          There is user-written program. xtvar (that does not work with stata 11), but it does not seem to accept constraints as well.


          I look forward to your contribution.

          Thanks

          Comment


          • #6
            xtvar is from SSC.

            On that detail, there is no need for uncertainty either, as (once again) the syntax makes it explicit.


            Code:
                    syntax varlist [if] [,          ///
                            LAGs(integer 2)         ///
                            Reps(integer 200)       ///
                            STep(integer 8)         ///
                            Level(integer 95)       ///
                            SSAving(string)         ///
                            POoled                  ///
                            bsn                     ///
                            dbsn                    ///
                            bsp                     ///
                            mc                      ///
                            STIrf                   ///
                            norm                    ///
                            nodraw                  ///
                    ]
            You don't have to be a programmer to understand the rules: if an option isn't named and no wildcard option * is specified, then it's certain that that option is not allowed. Programmers do sometimes allow options that aren't documented, and I just did that today for reasons that I won't document in a program that isn't even public yet, but no programmer can fool the syntax command.

            Have you searched for posts on this issue?

            Comment


            • #7
              I have searched a lot but I can not really find any solution. However, I can see some academic papers that estimate panel VAR with restrictions and graph the IRF.
              It will be nice if there is any way to do that!

              I hope someone can help.

              Thanks

              Comment


              • #8
                Since I am not a programmer, does any one think it is easy to add this option to the current pvar programme?
                Thanks a lot
                Mike

                Comment


                • #9
                  Dear All
                  I thought to bring this up again as it might be that a new participant has some ideas on how to do this.

                  Your help is much appreciated.
                  Thanks
                  Mike

                  Comment


                  • #10
                    Dear Mike,

                    I also find myself in a situation similar to yours...have you figured it out yet?. I was also interested in forecasting after 'pvar', but I wrote an email to the authors of the command (Michael Abrigo and Inessa Love), and it does not support that feature. I tried the following but it didn't work out as well:

                    Code:
                    constraint 1 [d_l_hydro_2]L1.d_l_wincos_2 = 0
                    constraint 2 [d_l_hydro_2]L.d_l_wincos_2 = 0
                    constraint 3 [d_l_hydro_2]d_l_wincos_2 = 0
                    
                    pvar d_l_PW_2  d_l_hydro_2 d_l_wind_2 d_l_solar_2, exog (L.d_l_hydcos_2 L.d_l_wincos_2 L.d_l_gdppc)
                    As it can be seen, I tried to restrict the coefficient of d_l_wincos_2 on the equation of d_l_hydro_2 to zero in three different ways, but the estimation results dont show a 0, but rather the normal estimation output.

                    I don't know if there a similar packages in R in which one could try to figure out how to impose the restrictions or perform the forecasting.

                    Best,


                    Juan

                    Comment


                    • #11
                      Hi Juan
                      I feel disappointed as well. I did not find an answer to this. However, it appears that few papers are applying this approach. they might be using SAS.
                      I hope there is a way that someone here can help.
                      Thanks
                      Mike

                      Comment


                      • #12
                        Hey Mike,

                        I wrote a private message, but basically I wanted to ask you: "could you please redirect me to those papers you say apply this methodology with restrictions? I was thinking about writing to the authors of those papers.

                        Thanks,


                        Juan

                        Comment


                        • #13
                          Dear All
                          This is a bit old issue that has not been resolved.
                          Can anyone help in finding out a solution to that? is there any way to add a constraint option ? or having a different programme that can achieve that?

                          Thanks

                          Comment


                          • #14
                            Hi All
                            I thought to bring this up again as it is still not resolved.
                            Unfortunately, pvar does not seem to be useful here. Does anyone know another way to solve this issue?

                            Thanks

                            Comment

                            Working...
                            X