"cov=" in panel GMM

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

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

"cov=" in panel GMM

Postby maxchen » Tue Nov 04, 2008 6:06 am

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 K
equation 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: 11407
Joined: Tue Sep 16, 2008 5:38 pm

Re: "cov=" in panel GMM

Postby EViews Gareth » Tue Nov 04, 2008 11:43 am

The equation is just-identified (same number of instruments as regressors). Thus those options will give the same results.
Follow us on Twitter @IHSEViews

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

Re: "cov=" in panel GMM

Postby maxchen » Tue Nov 04, 2008 5:06 pm

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

Code: Select all

c = 0
equation eq51.gmm(c=1e-6,iter=sim,gmm=persur) I C F @ C F K
c = 0
equation 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: 11407
Joined: Tue Sep 16, 2008 5:38 pm

Re: "cov=" in panel GMM

Postby EViews Gareth » Tue Nov 04, 2008 5:22 pm

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.
Follow us on Twitter @IHSEViews

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

Re: "cov=" in panel GMM

Postby maxchen » Tue Nov 04, 2008 5:55 pm

Code: Select all

c = 0
equation 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: 11407
Joined: Tue Sep 16, 2008 5:38 pm

Re: "cov=" in panel GMM

Postby EViews Gareth » Tue Nov 04, 2008 6:09 pm

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:

  • Start with an initial estimate of beta (usually from 2SLS)
  • 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)

Follow us on Twitter @IHSEViews

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

Re: "cov=" in panel GMM

Postby maxchen » Tue Nov 04, 2008 6:39 pm

Thanks very much for your detail!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 5 guests