Page 1 of 1

Forecasting with GMM

Posted: Wed Apr 29, 2009 10:17 am
by mornington
I am estimating an implicitly defined equation (Taylor rule) with GMM. Here are the steps I take to do this:

1) Object-> New Object-> System

2) Specify the system as:
ff-((1-c(1))*c(2))-((1-c(1))*c(3)*picpip(+4))-((1-c(1))*c(4)*lgap)-(c(1)*ff(-1))

param c(3) 1.5 c(4) 0.5

@inst 1 lgap(-1) lgap(-2) lgap(-3) lgap(-4) picpip(-1) picpip(-2) picpip(-3) picpip(-4) ff(-1) ff(-2) ff(-3) ff(-4)

Note that the system is implicitly defined - there is no equation as such. I estimate using GMM. The reason I do this in a system rather than in the Quick-> Estimate equation is because I have access to a larger number of options under system estimation (Continuously Upadated GMM etc.).

3) I want to forecast values of ff from the estimated GMM equation. I assume this begins with `Make model'. However, since I do not have an equation, `Make model' gives me an error. Is there any other way I can forecast from this equation?

Thanks,

T

EDIT: Further to this post, I tried estimating the equation using Quick->Estimate equation and when I tried `Forecast' it gave me a `Syntax Error'.

Re: Forecasting with GMM

Posted: Wed Apr 29, 2009 10:28 am
by EViews Gareth
There's a few interesting things with your post.

First off, I'll point out that EViews does not support continuously updating GMM estimation. You might be getting confused by the simultaneous updating options. Note this is still an iterative procedure, it is not continuously updating.


Secondly it seems to me that although you have defined your system implicitly, there appears no reason to do so. Surely you can just move ff to the left hand side? Your specification defines the residual - there is no reason, I can see, that you can't define it as a standard equation.

Defining it as a standard equation would let you estimate it, and forecast it, in an Equation object. Or it would let you keep it in a System Object, but forecast from a model.

Re: Forecasting with GMM

Posted: Wed Apr 29, 2009 10:49 am
by mornington
Gareth, thanks for your superquick reply.

1) I am grateful for your first point; I was under the assumption that simultaneously updating the weighting matrix and coefficients amounted to CU-GMM.

2) I am not sure about your second point. I need to define orthogonality conditions with the defined residual - say `e', then

E(Z'e)=0

where `Z' are the instruments defined using the "@instr" specification. The proof of the pudding is in the eating, so I tried estimating the model your way (in the equation box with ff=((1-c(1))*c(2))-((1-c(1))*c(3)*picpip(+4))-((1-c(1))*c(4)*lgap)-(c(1)*ff(-1)) and the instrument list as before) and the point estimates were awry, otherwise they match with what has been reported in the literature. I believe the two specifications are not equivalent.

I am happy to go to the Equation box and its reduced options but the specification seems to be sacrosanct. :-)

EDIT: I am still asking for your help, just in case it was not obvious!

EDIT: A minus sign!! Gareth, many many many apologies! It's done.

Re: Forecasting with GMM

Posted: Wed Apr 29, 2009 11:05 am
by EViews Gareth
Looks to me like you've made a rudimentary algebra mistake. Moving ff to the left hand side would yield a specification of:

ff=((1-c(1))*c(2))+((1-c(1))*c(3)*picpip(+4))+((1-c(1))*c(4)*lgap)+(c(1)*ff(-1))



Edit: Posted before I noticed your second Edit.

Glad it worked out.

Re: Forecasting with GMM

Posted: Wed Apr 29, 2009 11:07 am
by mornington
Gareth,

Yes I just realized that as well. Thank you, really, for your comments on this one. It finally looks as if my project will be ready by tomorrow :)

Re: Forecasting with GMM

Posted: Thu May 07, 2009 2:24 am
by newlucio
Hi,
I've found very interesting this post. I'm currently working on a taylor rule for EMU for my final dissertion and I was willing to use TSE and CUE for my estimation (I was told that using the "i" option for cue, and "o" for tse it would have been ok)...I'm using Eviews 6, is it still the case?

2)for another regression (always TR in EMU with GMM) I always obtain "Near singular matrix"... I'm using as much data as I can (I'm replicating an analysis spanning 1999Q1-2005Q2) and it works only if I use the numeric derivative method... unfortunately I have not clear what type of estimation eviews actually performs in this way (plus, results are different from those obtained by the authors). can you explain me what does it mean with "numeric derivative" vs. analytic derivative?

cheers

luciano

edit: could option c (One step (iteration) of the coefficient vector following
one step of the weighting matrix) be TSE?

Re: Forecasting with GMM

Posted: Thu May 07, 2009 3:16 am
by yrnm
Dear Gareth:

I am a bit puzzled about your answer on CUE-GMM as I can read from EViews 5 Help the explanation shown below
The CUE GMM aims at estimating the weighting matrix and the parameters contemporaneously which is something I can expect to be provided by option i

If not, a detailed explanation of all these options would be grateful
many thanks
Y.

_________________________________________________________
Additional Options for Non-Panel Equation and System estimation

w Use White's diagonal weighting matrix (for cross section data).
b=arg (default="nw") Specify the bandwidth: "nw" (Newey-West fixed bandwidth based on the number of observations), "number" (user specified bandwidth), "v" (Newey-West automatic variable bandwidth selection), "a" (Andrews automatic selection).
q Use the quadratic kernel. Default is to use the Bartlett kernel.
n Prewhiten by a first order VAR before estimation.
i Iterate simultaneously over the weighting matrix and the coefficient vector.
s Iterate sequentially over the weighting matrix and coefficient vector.
o (default) Iterate only on the coefficient vector with one step of the weighting matrix.
c One step (iteration) of the coefficient vector following one step of the weighting matrix.
e TSLS estimates with GMM standard errors.

_________________________________________________________

Re: Forecasting with GMM

Posted: Thu May 07, 2009 8:14 am
by EViews Gareth
CUE GMM estimates the model by parameterising the weight matrix as a function of the coefficients, and then optimising the resultant objective function in one go, usually through the use of some iterative maximiser.


EViews currently does not do this. EViews uses an iterative procedure (commonly called the 1-step, or N-step, or iterate-to-convergence) whereby an initial estimate of the coefficients is made (from 2SLS), then using those coefficients and estimate of the weight matrix is made, then using that weight matrix a new estimate of the coefficients is made, then a new estimate of the weight matrix is made, and so on.....


EViews offers four methods for doing this:
  • Simultaneous updating
  • Sequential updating
  • Updated weights once, then iterate coefs to convergence
  • Update coefs once.

The difference between the first two only becomes apparent if you have a non-linear specification for your equation, since then you have to use an iterative maximiser for both the weight iterations, and the coefficient iterations:

Simultaneous updating
This algorithm works by calculating initial estimates of the coefficients, then taking one step of the weight maximiser, then taking one step of the coefficient maximiser, then taking one step of the weight maximiser, then one step of the coefficient maximiser etc......

Sequential updating
This algorithm works by calculating initial estimates of the coefficients, then getting estimates of the weight matrix by fully maximising its objective function, then getting estimates for the coefficients by fully maximising the coefficient objective function, then fully maximising the weights again, and so on....

Note that the term "fully maximising" means that the maximiser is run until convergence is achieved or the maximum number of iterations set in Optimization Control is met.


Obviously if the coefficients are linear, then these two methods are the same since a single step of the coefficient maximiser will achieve full optimisation.


The last two methods work somewhat differently in that they only estimate the weight matrix once, then either take one step of the coefficient optimiser, or fully optimize it.




I fully understand why people can confuse what we term simultaneous updating with continuously updating, and I regret that we ever termed it this.

EViews 7 should rectify this to some extent.

Re: Forecasting with GMM

Posted: Tue May 26, 2009 7:46 am
by newlucio
Gareth, just to be sure, was iterated GMM already supported in 2004's version? and if yes, was it the same routine or was it updated/fixed/corrected in following releases. I need this information because I had to move to STATA for my analysis and I'm using their iterated GMM, obtaining different results, despite the fact that the dataset is the same..I thought this could be explained by the update in the routines (assuming that both STATA and E-views should deliver the same result using same dataset and same equation.. unfortunately when I tried to run the same regression I obtained the usual "near singular matrix" error..)

thanks

lucio

Re: Forecasting with GMM

Posted: Tue May 26, 2009 8:14 am
by EViews Gareth
Which 2004 version are you talking about?

Re: Forecasting with GMM

Posted: Wed May 27, 2009 6:06 am
by newlucio
I'm trying to replicate the results of a paper which was published on may 2004. I suppose the authors were using the most updated versione of eviews available in 2004.. from your website I wasn't able to understand which one (as there have been so many updates)

thanks

Re: Forecasting with GMM

Posted: Wed May 27, 2009 6:35 am
by startz
I'm trying to replicate the results of a paper which was published on may 2004. I suppose the authors were using the most updated versione of eviews available in 2004.. from your website I wasn't able to understand which one (as there have been so many updates)

thanks
If a paper was published in an academic journal in 2004, the estimation was probably done in 2002...

Re: Forecasting with GMM

Posted: Wed May 27, 2009 8:01 am
by EViews Gareth
Which probably means it was EViews 3 (possibly 4).

That's going back a little too far in time for my knowledge.

Re: Forecasting with GMM

Posted: Sat Sep 26, 2015 6:05 am
by azmo20
I am estimating GMM model and I would like calculate the MSE (forecast) but Eviews do Syntax ERRor!!!
can any one help me?
its program is: c(1)*(c1^(-(c(2)))*(at^((c(2)-c(3))/(1-c(3)))))*r(-1)-1

Re: Forecasting with GMM

Posted: Sat Sep 26, 2015 7:20 am
by EViews Gareth
Hard to say. Could you provide the workfile?