## "cov=" in panel GMM

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

### "cov=" in panel GMM

If cov= is not set, then it use the same setting as gmm=, right?

for example

Code: Select all

`wfopen(t=txt) http://www.wiley.co.uk/wileychi/baltagi/supp/Grunfeld.fil names=(fn yr i f k)pagestruct fn @date(yr)equation eq01.gmm(gmm=persur) I C F K @ C F Kequation eq02.gmm(gmm=persur,cov=persur,nodf) I C F K @ C F K`

you will find that eq01 and eq02 share the same "std err"

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

### Re: "cov=" in panel GMM

The equation is just-identified (same number of instruments as regressors). Thus those options will give the same results.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

### Re: "cov=" in panel GMM

When over-identified, the following also give the same "std err"

Code: Select all

`c = 0equation eq51.gmm(c=1e-6,iter=sim,gmm=persur) I C F @ C F Kc = 0equation eq52.gmm(c=1e-6,iter=sim,gmm=persur,cov=persur,nodf) I C F @ C F K`

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

### Re: "cov=" in panel GMM

Yep, if you iterate to convergence you'll also get the same results.

If you think about it, the cov=persur option takes the estimation results then does one more step of the weighting matrix to get the covariances. At convergence that one extra step will yield exactly the same results as the previous step, thus things don't change.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

### Re: "cov=" in panel GMM

Code: Select all

`c = 0equation eq53.gmm(c=1e-6,iter=sim,gmm=persur,cov=perwhite,nodf) I C F @ C F K`

produce smaller SE than eq52.
I think gmm= is for coef estimation, and cov= for covariance estimation, which are computed after the coefs are estimated.

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

### Re: "cov=" in panel GMM

That's exactly what those options are, gmm= gives the estimation (i.e. the coefficient) weighting matrix, and cov= gives the covariance weighting matrix, which is one additional step. If you choose a different cov= method than the gmm= method, then that extra step of the weighting matrix calculation will give different results, since it is using a different estimation method.

Perhaps a step-by-step explanation of what goes on will make things clearer:

• From that Beta obtain an estimate of the residuals, and from those residuals form the weighting matrix, W, using whatever option is in gmm=
• From that estimate of W, calculate a new estimate of Beta
• If doing only 1 iteration estimation, then those Beta are the final coefficient estimates. If doing iterate-to-convergence estimation, then re-do steps 2 and 3 until they have converged
• If there is no cov= option, then calculate the covariance matrix using the existing weighting matrix, W
• If there is a cov= option, then re-calculate the residuals based upon the final Beta estimates, but using the weighting matrix calculation based upon the cov= option. Note that if the cov= option matches the gmm= option and you've iterated to convergence, then this weighting matrix calculation will give exactly the same results as the existing W. If the cov= option does not match the gmm= option, then this weighting calculation will not match the previous calculation (and I don't believe there is any theory to say whether it will yield larger or smaller SEs - it depends upon the cov= option, and in your case of White, there is no theory that says that a White correction will yield bigger or smaller)

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

### Re: "cov=" in panel GMM

Thanks very much for your detail!