Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: NLLS to GMM

From   penarol49 <>
Subject   st: NLLS to GMM
Date   Fri, 17 Feb 2012 19:40:43 -0800 (PST)


I had a question regarding how to define parameters using the interactive
GMM command, and I think the problem can be stated most simply by comparing
with the NLLS results.

I had one parameter I want to find (this is {kk1}) and one instrument. I can
do this easily with the nl command:

nl (V = {kk1}*ltfa + {c1}*(philag-{kk1}*ltfalag) +
{c2}*(philag-{kk1}*ltfalag)^2 + {c3}*(philag-{kk1}*ltfalag)^3),
variables(ltfa ltfalag philag) vce(cluster firmid)

This gives me what seems like the right solution for {kk1}. I am not looking
for the parameters in front of the (philag-{kk1}*ltfalag), but it seems
these have to be used in the nl syntax.

I then try to write this same thing by using gmm:

gmm (V - {kk1}*ltfa - {c1}*(philag-{kk1}*ltfalag) -
{c2}*(philag-{kk1}*ltfalag)^2 - {c3}*(philag-{kk1}*ltfalag)^3),
instruments(ltfa) vce(cluster firmid)

I cannot write it this way though, because it tells me that I have more
parameters than instruments (which is obviously true here, but it seems like
you have to put the parameters in front of any variable). And if I take
{c1},{c2}, and {c3} out then {kk1} is way too big.

Anyone know how I can do the same thing I am doing with nl using the gmm


View this message in context:
Sent from the Statalist mailing list archive at
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index