Page 1 of 1

Error in PANEL STRUCTURAL VAR

Posted: Mon Mar 29, 2021 8:51 am
by polisci_nerd
Hi,

I'm trying to estimate a panel structural var based on Pedroni, Peter (2013) "Structural Panel VARs", Econometrics, 1 (2),180-206. I got the code from Prof. Pedroni, and transformed my dataset (unbalanced panel) into the format the code required (balanced panel with NAs). However, when I try to estimate the model, I always get the following error.

processing panel member 1
chosenlag is 1
## MAT14. Non-invertible Matrix. Using Generalized Inverse for SYMMETRIC.
The Error Occurred At Location 968, Line 52 of loop/block

I don't know what went wrong. Could you please have a look at the data and code attached and help me if possible?

Re: Error in PANEL STRUCTURAL VAR

Posted: Wed Mar 31, 2021 9:36 am
by TomDoan
Individual 2 has only 10 usable data points. That's probably not enough to do the analysis that's required on each individual. (It estimates a separate 1 lag VAR on each individual.)

Re: Error in PANEL STRUCTURAL VAR

Posted: Wed Mar 31, 2021 10:08 am
by polisci_nerd
TomDoan wrote:Individual 2 has only 10 usable data points. That's probably not enough to do the analysis that's required on each individual. (It estimates a separate 1 lag VAR on each individual.)
Hi Tom,
Thanks for your reply. This makes sense. I actually already removed some short series before trying the svar. Do you have any recommendation about the minimum time periods of each individual for a panel svar? I have 4 endogenous variables, which means 5 parameters per equation, and 20 in total for the system. What is the safe minimum number of observations for running a panel var in my case?

Re: Error in PANEL STRUCTURAL VAR

Posted: Wed Mar 31, 2021 10:57 am
by polisci_nerd
TomDoan wrote:Individual 2 has only 10 usable data points. That's probably not enough to do the analysis that's required on each individual. (It estimates a separate 1 lag VAR on each individual.)
Hi Tom,
On a second thought, the short time series shouldn’t be the major reason for the error. VARs are estimated equation by equation, which means I never estimate more than 5 parameters in a single regression. So it should be feasible given the length of the shortest countries in my panel.

Re: Error in PANEL STRUCTURAL VAR

Posted: Wed Mar 31, 2021 1:53 pm
by TomDoan
Except that it runs the VAR on differences, so that loses one data point. Plus the one lag loses another, so you're down to 8 data points. Then it is freely estimating a 4 x 4 covariance matrix, which, in effect, means three extra free coefficients (for the contemporaneous cross effects). All told, that means with 10 data points and 4 variables, you're getting a perfect fit. With 11 data points, you wouldn't have a perfect fit, but the results would be quite suspect due to overfitting. I probably would want closer to 20 data points per individual to be safe.