Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: NLS as GMM


From   "[email protected]" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: NLS as GMM
Date   Fri, 25 Oct 2013 13:50:52 +0000

Hello
I am implementing a NLS by means of the GMM command.
The equation looks like
yt=h(xt, theta)+et
with theta vector of parameters (4 in my case) and h a nonlinear function (I do not specify it for simplicity, but of course it has a clear functional form).

By considering the FOC of the NLS, we get four equations (one for each theta)
E[ d h(xt, theta)/d theta  * (yt-h(xt, theta))]=0 where "d" stand for the derivative.

I can use them for GMM purposes by choosing the following interpretation:

(yt-h(xt, theta)) as "moment condition"
d h(xt, theta)/d theta  as set of instruments (they are four, one for each theta).

So I tried to write the code in this way

gmm (y-h(xt, {theta}), ///
instruments(d h(xt, theta)/d {theta_1} ///
instruments(d h(xt, theta)/d {theta_2} ///
instruments(d h(xt, theta)/d {theta_3} ///
instruments(d h(xt, theta)/d {theta_4} ///
..... plus other conditions on the derivatives and first step matrix

I get an error.
The problem is that the instruments are not recognized, as they are not data, but functions and indeed contain also the parameters to be estimated (that is the thetas).
What should I do?

1)Is it right the way I framed the GMM estimation, or there is a more efficient way of writing it for gmm stata implementation?

2)Is it possible to use instruments that are not data, i.e. functions containing the parameters?

thank you very much

Sofia Cazzaniga




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index