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


From   "Marder, Andrew" <amarder@hbs.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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
        mata:_gmm_wrk()

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: statalist@hsphsun2.harvard.edu
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index