Error in PANEL STRUCTURAL VAR
-
polisci_nerd
- Posts: 3
- Joined: Mon Mar 29, 2021 6:13 am
Error in PANEL STRUCTURAL VAR
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?
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?
- Attachments
-
- panelSVAR-pedroni-econometrics-v25feb14.RPF
- (21.46 KiB) Downloaded 813 times
-
- DataPanel.xlsx
- (57.56 KiB) Downloaded 762 times
Re: Error in PANEL STRUCTURAL VAR
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.)
-
polisci_nerd
- Posts: 3
- Joined: Mon Mar 29, 2021 6:13 am
Re: Error in PANEL STRUCTURAL VAR
Hi Tom,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.)
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?
-
polisci_nerd
- Posts: 3
- Joined: Mon Mar 29, 2021 6:13 am
Re: Error in PANEL STRUCTURAL VAR
Hi Tom,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.)
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
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.