BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
LzEr23
Obsidian | Level 7

Dear all,

 

I  am having some trouble with running a dynamic panel data model using GMM estimation with Proc Panel.

 

Basically, it does provide me with outcome, but it just doesn't seem to be correctly estimated.

One, two-step GMM doesn't work at all. It gives me the following message:

      "R: No residual in the model to analyze. Computations will not be performed."

 

Two, one-step estimation does give an outcome table, but the Sargan test p-value is 1.0000 which is too good.

As far as I know, this seems to be related to identification issue. Probably due to too many instruments to be estimated.

 

So, I'd really appreciate if there's anyone who can help me out solving this issue.

1. Any other ways to fix this problem, still employing the panel data model.

   (maybe I have coded something inappropriately)

2. Would estimating each panel separately using GMM help resolving this issue? would it have same implication, apart from panel effect adjustment?

 

Here's the data structure and coding that I have used.

 

library: work

table name: work.panel

 

panel id column: indip    (n=5)

time id column: year      (t=1981, 1982, ..., 1998)

no. of obs=90

no. of obs=85 when Y_1 is employed in the model

 

dependent var: Y

independent var: Y_1, A1, A2, A3, A4, A5, B1, B2, C1, C2, D1     (total of 11)

(Y_1 is lagged term of Y)

codes used:

 

proc panel data=work.panel;
  id indip year;
  inst depvar;
  model Y=Y_1 A1 A2 A3 A4 A5 B1 B2 C1 C2 D1 / gmm maxband=15 artest=2 noint;
run;

 

This is about it.

 

It would really be helpful if I can get some advice on this.

 

1 ACCEPTED SOLUTION

Accepted Solutions
xyz0505
SAS Employee

Hi,

First of all, I don't think you are estimating a dynamic panel model with your code. 

To do dynamic GMM, the very first thing is to do first difference to the model and run GMM on the differenced equation. You can find reference in PANEL's user manual detail section for the equations and instrument matrix. Your code seems run everything on raw data.

Try the following code:

 

proc panel data=work.panel;
  id indip year;
  model Y=A1 A2 A3 A4 A5 B1 B2 C1 C2 D1 / dyndiff;
run;

 

DYNDIFF takes care of everything for you.

 

Second, I notice that you only have N=5, and T=20. When T is large it means instruments increase quadratically, and too many instruments bias the estimators. The asymptotic properties is coming from large N. So you can try to limit the number of IVs by using "maxband" option.

 

At last, GMM=1 or 2 doesn't affect the consistency of the estimators, it's just the matter of efficiency or not. I feel like if you are in a large T and small N scenario, it won't be efficient anyway, so it doesn't matter if you are using gmm1 or gmm2. 

View solution in original post

2 REPLIES 2
xyz0505
SAS Employee

Hi,

First of all, I don't think you are estimating a dynamic panel model with your code. 

To do dynamic GMM, the very first thing is to do first difference to the model and run GMM on the differenced equation. You can find reference in PANEL's user manual detail section for the equations and instrument matrix. Your code seems run everything on raw data.

Try the following code:

 

proc panel data=work.panel;
  id indip year;
  model Y=A1 A2 A3 A4 A5 B1 B2 C1 C2 D1 / dyndiff;
run;

 

DYNDIFF takes care of everything for you.

 

Second, I notice that you only have N=5, and T=20. When T is large it means instruments increase quadratically, and too many instruments bias the estimators. The asymptotic properties is coming from large N. So you can try to limit the number of IVs by using "maxband" option.

 

At last, GMM=1 or 2 doesn't affect the consistency of the estimators, it's just the matter of efficiency or not. I feel like if you are in a large T and small N scenario, it won't be efficient anyway, so it doesn't matter if you are using gmm1 or gmm2. 

LzEr23
Obsidian | Level 7
Thanks a lot for the answer. I did use FD data, manually processed, but I guess your code is simpler and more intuitive. And the rest of your answer is exactly what I needed to know. Thank you again.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 669 views
  • 0 likes
  • 2 in conversation