Message error when dummy used as instruments in GMM

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

wolly77
Posts: 32
Joined: Mon Oct 05, 2009 4:28 am

Message error when dummy used as instruments in GMM

Postby wolly77 » Tue Dec 04, 2012 11:38 pm

Dear guys, I write you about a problem encountered in GMM estimation. I am using this estimation technique to estimate a Neo Keynesian Phillips cruve for US. The problem is the following. I have some dummies in the equation and then I want to use it as additional instruments. But when I insert these impulse dummies in the instrument lists, an error message appear in Eviews "Singular matrix". If, instead, I estimate the same model with IV technique, I obtain plausible results and the estimation runs.
I send you my database in Eviews. In the equation called "pc_gmm" I have dropped the dummy du2006q4 in the instrument lists because the error message appears. What is the problem? I think that should be a bug in Eviews.

Thank you.

P.S: my Eviews version is 7.1.
Attachments
PC_GMM.WF1
(45.54 KiB) Downloaded 242 times

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

Re: Message error when dummy used as instruments in GMM

Postby EViews Gareth » Wed Dec 05, 2012 10:08 am

I'm not convinced this is a bug.

As you know, the weighting matrix (White) for GMM is calculated as inv(Zu'Zu) where Z is the instrument matrix weighted by the residuals. For the initial estimate, the residuals are taken from Two Stage Least Squares.

We can, therefore, easily manually create the weighting matrix with the following code:

Code: Select all

group insts infl(-1) infl(-2) infl(-3) infl(-4)  y(-1) y(-2) y(-3)  rulc_gg(-1)   rulc_gg(-2) rulc_gg(-3)  rulc_gg(-4)   du2008q4 c
pc_gmm.tsls infl infl_exp infl(-1) infl(-2) infl(-3)  y   du2008q4 du2006q4 du1986q2 c @ insts

pc_gmm.makeresid u

group instsu
for !i=1 to insts.@count-1
   %sername = insts.@seriesname(!i)
   instsu.add u*{%sername}
next
'handle constant
instsu.add u

matrix zu = @convert(instsu)

matrix w = @inverse(@transpose(zu)*zu)


Note that EViews errors on computing inv(Zu'Zu), since the matrix is close to singular. I tried putting that matrix into Matlab and Matlab also states that it is close to singular.
Follow us on Twitter @IHSEViews

wolly77
Posts: 32
Joined: Mon Oct 05, 2009 4:28 am

Re: Message error when dummy used as instruments in GMM

Postby wolly77 » Thu Dec 06, 2012 8:25 am

Thank you Gareth for your reply.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 4 guests