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 at the end of May, and its replacement, statalist.org is already up and running.


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

st: NLLS to GMM


From   penarol49 <penarol49@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: NLLS to GMM
Date   Fri, 17 Feb 2012 19:40:43 -0800 (PST)

Hi,

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
command?

Thanks,
Ariel

--
View this message in context: http://statalist.1588530.n2.nabble.com/NLLS-to-GMM-tp7296192p7296192.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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