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: RE: Nonlinear GMM estimation

From   "Jay Tuthill" <>
To   <>
Subject   st: RE: Nonlinear GMM estimation
Date   Thu, 11 Nov 2010 14:46:27 -0500

Cannot say I am anything close to an expert in nonlinear GMM, but for a
general engineering approach, am curious if you have tried plotting your
first y against x1 term and fitting strictly this equation followed by
plotting y against x1 and l1_x1 (assuming lag 1) and looking at your
response surface to see if it shows unstable regions and again, fitting
this 2 term equation and seeing how you make out. Of course, you have to
guess at the parameters when you are beginning. In other words, work up
to your full equations using reduced models. Even though the simpler
models may have no meaning, solving them may give you clues to solving
the full equation.

Regards...Jay Tuthill

-----Original Message-----
[] On Behalf Of McLaughlin,
Sent: Wednesday, November 10, 2010 9:30 PM
Subject: st: Nonlinear GMM estimation

Hi Everyone,

I have been trying to Stata 11.1 to instrument for x1 in the following
nonlinear equation using the gmm moment evaluator program: 


I created a moment evaluator program and called it with gmm (below):

program gmm_dsm
	version 11
	syntax varlist if, at(name)
	quietly {
		tempvar mu nu
		gen double `mu' =0 
       replace `mu' = `at'[1,1]*(1-exp(`at'[1,5]*x1))+
       + `at'[1,3]*(1-exp(`at'[1,5]*l2_x1))+
`at'[1,4]*(1-exp(`at'[1,5]*l3_x1))+ *`at'[1,6]*x2
		replace `varlist' = y - `mu'

gmm gmm_dsm if, nequations(1) parameters(b0 b1 b2 b3 gamma0 alpha)
instruments(x1 l1_x1 l2_x1 l3_x1  _instrument  x2, noconstant)
vce(cluster id) onestep from(b0 -.00056 b1 -.0028 b2 -.00087 b3 -.004
gamma -83 alpha .05)


When I run call the program, it begins to run and then I receive the
following error:

"could not calculate numerical derivatives -- flat or discontinuous
region encountered
could not calculate numerical derivatives -- flat or discontinuous
region encountered


1.) Can you use the moment evaluator function of gmm in Stata 11 to
estimate an equation that is nonlinear in the parameters?
2.) Is there a way to replicate the nonlinear results produced by nl()
using gm() for this equation considering I have more parameters than
"instruments" (covariates)?

Thanks in advance for any help you provide,


*   For searches and help try:

*   For searches and help try:

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