Announcement

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

  • Cross-panel dependency in Panel VARs (pvar)

    Hi,

    I'm trying to run a Panel VAR (PVAR) with a panel dataset of just over 30 countries between 1994 and 2014. I have found cross sectional dependence, so I am trying to control for that in my PVAR estimations.

    When I run a pvar without clustered standard errors [pvar variable1 variable2 variable3 variable4 , exog() lags(2) instlags(1/3)][/where variables are growth rates of log levels of the original variables] the regressions run normally and I am able to plot impulse response functions
    [pvarirf, oirf mc(200) byoption(yrescale) porder( variable1 variable2 variable3 variable4 )]

    The same is the case when I include robust standard errors in my pvar code [pvar variable1 variable2 variable3 variable4 , exog() lags(2) instlags(1/3) vce(robust)].

    However, when I try to include clustered standard errors [pvar variable1 variable2 variable3 variable4 , exog() lags(2) instlags(1/3) vce(cluster country_id)] I get a regression output but when I try to plot impulse response functions [pvarirf, oirf mc(200) byoption(yrescale) porder( variable1 variable2 variable3 variable4 )] it comes up with 'matrix not positive definite r(506)'.

    I believe this is an econometrics issue with the variance-covariance matrix of my variables in the pvar but I don't understand why the impulse response function works when using robust standard errors but not with clustered standard errors. Could anyone possibly explain why this may be the case? Also are there any codes that can be used to try and identify this issue with the covariance matrix on STATA?

    Many thanks,

    Keshav Gupta
Working...
X