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: GMM with inequality and equality constraints

From   "Marder, Andrew" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: GMM with inequality and equality constraints
Date   Mon, 19 Mar 2012 17:29:02 -0400

Dear Austin and Stas, thank you for your helpful suggestions.

I have done some additional detective work, and wanted to report back.  Lines 1097 and 1098 of Stata12/ado/base/g/gmm.ado seem particularly important:

        // estimation

I believe _gmm_wrk is contained in Stata12/ado/base/l/lmataado.mlib, a compiled mata library.  I don't think I can look at the source code contained in this library, but I would bet _gmm_wrk calls optimize, which can take linear equality constraints but not inequality constraints.  Does this mean adding support for inequality constraints to the gmm function can only be done by StataCorp?

Here is a potential hack for this problem:
1. Since the unconstrained parameter estimates violate the inequality constraint there may be a way to argue the constraint holds with equality.
2. Figure out how to add equality constraints to my gmm model.  I don't see a way to pass equality constraints to the gmm function, would it work to call optimize_init_constraints(S, Cc) before I call gmm?

Thanks again, Andrew
-----Original Message-----
From: Marder, Andrew 
Sent: Thursday, March 15, 2012 10:41 AM
To: [email protected]
Subject: GMM with inequality and equality constraints

Dear statalisters, 

The generalized method of moments estimation in Stata is great!  It was wonderful how easy it is to estimate a nonlinear GMM model.  I am trying to replicate part of a paper that estimates a GMM model subject to equality and inequality constraints that look like:

E[ alpha w_i + beta x_i ] = 0
E[ gamma y_i + delta z_i ] >= 0

How hard would it be to modify Stata's gmm function to accommodate constraints like these?

Thanks, Andrew

*   For searches and help try:

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