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, statalist.org is already up and running.


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

st: gmm moment program with multiple moments and no independent vars


From   Reinhard Schiel <rjschiel@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: gmm moment program with multiple moments and no independent vars
Date   Sat, 29 Jun 2013 17:43:49 +0200

HI Everyone

I am having trouble executing the gmm command.
In particular I have 62 moments (and a total of 16 parameters) which 
requires evaluation.
As the gmm command has a limit of 800 for dyadic operators (+,-,*,/) l 
require a moment program to evaluate the moment conditions.
However the moment conditions do not contain any dependent variables.

For example the moment conditions all take some form of:
y-{b1}-{b1}*{b2}-(1-{b3})
where there are no x variables in the moment.

My first draft for the first 6 moment equations (just to try something 
simple before moving on to something harder with the total 62 moments) 
was:

capture program drop mygmm
program mygmm
version 12
syntax varlist if=20
quietly replace `varlist'=3D ///
(y1-{b1}-{b1}*(1-{b2})*{p1}) ///
(y2-(1-{b1})-(1-{b1})*(1-{b2})*{p1}) ///
(y3-{b1}*{b2}) ///
(y4-{b1}*(1-{b2})*(1-{p1})) ///
(y5-(1-{b1})*{b2}) ///
(y6-(1-{b1})*(1-{b2})*(1-{p1}))

end

With the following line code for the gmm command:
gmm mygmm , neq(6) nparameters(3) winitial(identity)

Yet stata reports the following error message:
error calling mygmm at initial values
options not allowed

Employing just the plain gmm command without any moment program for the 
above mentioned 6 moments works perfectly and yields great results.
i.e gmm (y1-{b1}-{b1}*(1-{b2})*{p1}) 
(y2-(1-{b1})-(1-{b1})*(1-{b2})*{p1}) 
(y3-{b1}*{b2})(y4-{b1}*(1-{b2})*(1{p1})) (y5-(1-{b1})*{b2}) 
(y6-(1-{b1})*(1-{b2})*(1-{p1})), winitial(identity)

How do a execute a gmm moment program with multiple moment condition 
when I do not have any independent variables?

Thanks
Hardy
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index