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: Imposing bounds on parameters estimated with -optimize-


From   "Lacy,Michael" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Imposing bounds on parameters estimated with -optimize-
Date   Wed, 14 Sep 2011 22:13:19 +0000

I'm using  Mata's -optimize- to maximize a function.   All items in the parameter vector must fall between 0 and 1; other values do not make sense.
 I was not getting good results with  -optimize- (lots of backing up, no convergence, etc.), until I hit on the idea of imposing those bounds.  The only way I could think of to do it seemed rather klugy:  At the beginning of the likelihood evaluator function, I inserted code to detect any values of the parameter vector outside that range, and reset value <=0 to 1e-5, and >=1.0 to 0.99999.  Then, my codes goes on with  the regular evaluation of the likelihood, using this adjusted parameter vector.
This worked decently.  However, this seemed like an odd way to do things.  Is there some other, better way to impose bounds on parameters estimated with 
-optimize-"

(And, for any of you who might have seen my question of about a week ago on another aspect of this topic, it seems that -optimize- is easier to use here than -ml-.)

Regards,

Mike Lacy
Assoc. Prof., Dept. of Sociology
Colorado State University
Fort Collins CO 80523-1784



*
*   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