Bookmark and Share

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


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

st: Nonlinear GMM estimation


From   "McLaughlin, David" <[email protected]>
To   <[email protected]>
Subject   st: Nonlinear GMM estimation
Date   Wed, 10 Nov 2010 21:30:29 -0500

Hi Everyone,

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

y={b0}*(1-exp({gamma0}*x1)+{b1}*(1-exp({gamma0}*l1_x1)+{b2}*(1-exp({gamm
a0}*l2_x1)+{b3}*///
(1-exp({gamma0}*l3_x1)+{alpha}*x2

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,2]*(1-exp(`at'[1,5]*l1_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'
	} 
	end

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)

Issue

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
r(430);"

Questions

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,

Dave


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index