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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Imposing bounds on parameters estimated with -optimize-


From   Steven Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Imposing bounds on parameters estimated with -optimize-
Date   Wed, 14 Sep 2011 19:20:28 -0400

You need to reparameterize. See http://www.stata.com/support/faqs/stat/intconst.html, especially sections 2 and 5.


Steve
On Sep 14, 2011, at 6:13 PM, Lacy,Michael wrote:

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/


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