Announcement

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

  • pvargranger does not work with pvar2

    hello, i would like to do the pvargranger test. however, i get the error message that pvargranger can only be used with pvar and not with pvar2. then i don't understand here the example from lütkepohl. Can anyone explain this to me?
    Code:
    /* NOTE
    This example uses follows that in the official Stata suite of time-series VAR packages
    estimated using the beta panel VAR suite.
    */
    
    webuse lutkepohl2, clear
      gen id = 1
    
    xtset id qtr
      global var dln_inv dln_inc dln_consump
    
    * Lag-order selection
    varsoc  $var
    pvarsoc $var
    
    * VAR estimation
    var   $var
      estimates store estvar
    pvar2 $var, fod lags(2)
      estimates store estpvar
    estimates table estvar estpvar, se
    
    * VAR stability    
    estimates restore estvar
      varstable, graph
    estimates restore   estpvar
      pvarstable, graph
    
    * Granger-causality
    vargranger, est(estvar)  
    pvargranger, est(estpvar)
    
    * IRF estimation
    estimates restore estvar
      tempname irfv irfvset
        irf create `irfv', step(10) set(`irfvset', replace)
      irf graph oirf, byopts(yrescale) 
      
    pvarirf, oirf porder($var) iter(100) dots step(10)
    here is the pvar2 command and then the pvargranger. why doesn't it work for me?
Working...
X