A special case of GMM estimation in R

I want to estimate the forward looking version of the Taylor rule equation using the iterative nonlinear GMM:

$i_t = \alpha + (1-\rho)\beta\pi_{t+1} + (1-\rho)\gamma x_t + \rho i_{t-1} + \varepsilon_t$

I have the data for all the variables in the model, namely $\pi$ (inflation rate), $x$ (unemployment gap) and $i$ (effective federal funds rate) and what I am trying to estimate is the set of parameters $\beta$, $\gamma$ and $\rho$.

Where I need help is in the usage of the gmm() function in the {gmm} R package. I 'think' that the parameters of the function that I need are the parameters:

gmm(g, x, type = "iterative",...)


where g is the formula (so, the model stated above), x is the data vector (or matrix) and type is the type of GMM to use.

My problem is with the data matrix parameter. I do not know the way in which to construct it (not that I don't know of matrices in R and all the examples I have seen on the internet are not similar to what I am attempting to do here. Also, this is my first time using the gmm() function in R. Is there anything else I need to know?

• Have you been able to figure it out? – mpiktas Oct 22 '13 at 11:31