Bookmark and Share

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

[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 <>
To   "" <>
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:
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) 

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}) ///


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}) 
(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?

*   For searches and help try:

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