Unstable GMM results

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

equis
Posts: 10
Joined: Wed Sep 28, 2011 3:35 pm

Unstable GMM results

Postby equis » Sun Oct 09, 2011 11:11 pm

I have estimated 100 GMM equations using a program that loops over such a line of code:

equation eq{!i}.GMM(INSTWGT=HAC,GMMITER=1,DERIV=AA) [equation] @ [instruments]

For some of the 100 cases the coefficient estimates calculated by Eviews are implausible: Eviews shows a negative coefficient while a positive coefficient would be expected. However, when double-clicking the equation, then clicking the "Estimate" button, and then just clicking the "OK" button (without changing any of the parameters in the "Equation Estimation" window), the coefficient value jumps from the negative value to the correct positive value.

My initial suspicion was that just opening and closing the "Equation Estimation" window would be using a different (default) parameter set. Therefore, I have already tried specifying as many parameters as possible directly in the code which generates the equation. However, this did not resolve the problem.

Is there a possible explanation for this behavior, and if so, how can this be corrected? Thank you for your reply.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Unstable GMM results

Postby EViews Gareth » Mon Oct 10, 2011 8:00 am

Different starting values the second time you estimate. Starting values are especially important for you, since you've stated only 1 GMM iteration will take place.

equis
Posts: 10
Joined: Wed Sep 28, 2011 3:35 pm

Re: Unstable GMM results

Postby equis » Mon Oct 10, 2011 4:23 pm

Hi Gareth, thank you very much for your reply. I have amended the equation command to allow for multiple iterations:

equation eq{!i}.GMM(INSTWGT=HAC,DERIV=an,method=nstep,gmmiter=1000,wscale="eviews",m=1000,c=0.0001,l=1000,showopts,cov="hac",covlag="a") [equation] @ [instruments]

However, it turns out that this does not resolve the problem. I still observe the same behavior that: When clicking the "Estimate" button an clicking "OK", the coefficient estimate jumps massively, not just by a bit.

I was able to narrow down the source of the problem: When I enter the exactly the same equation into the command prompt, just replacing {!i} by the counter value, say 1, and press enter, then the coefficient estimate is corrrect from the very beginning. So I think the problem stems from the fact that the equation is being estimated within a loop. The overall program code is:

for !i=1 to 100
equation eq{!i}.GMM(INSTWGT=HAC,DERIV=an,method=nstep,gmmiter=1000,wscale="eviews",m=1000,c=0.0001,l=1000,showopts,cov="hac",covlag="a") [equation] @ [instruments]
next

When replacing {!i} by 1, for example and entering into the command prompt

equation eq1.GMM(INSTWGT=HAC,DERIV=an,method=nstep,gmmiter=1000,wscale="eviews",m=1000,c=0.0001,l=1000,showopts,cov="hac",covlag="a") [equation] @ [instruments]

then the result will be correct. Not so when it is run within the loop. I can only speculate what might be causing this. Maybe the estimation of the coefficient does not complete because Eviews already moves to the next iteration of the loop. Would you have any further suggestions? Thank you in advance.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Unstable GMM results

Postby EViews Gareth » Mon Oct 10, 2011 4:30 pm

Different starting values the second time you estimate.

equis
Posts: 10
Joined: Wed Sep 28, 2011 3:35 pm

Re: Unstable GMM results

Postby equis » Mon Oct 10, 2011 11:09 pm

Possibly. How would I have to modify my code to use similar starting values as in the manual recalculation and thus arrive at the same estimation of the coefficient? Thank you.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Unstable GMM results

Postby EViews Gareth » Tue Oct 11, 2011 7:54 am

Just set the values in C before each estimation.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 1 guest