Statalist


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

Re: st: Stata's ml sticks


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: Stata's ml sticks
Date   Wed, 28 Jan 2009 11:56:45 -0500

Sergiy--
Why are you using -ml- for this?  Assuming you have no access to Stata
10 for this problem, where Mata -maximize- is the obvious solution,
you can use -ridder- (findit ridder) described at
http://www.stata.com/products/stb/journals/stb17.html, with subsequent
updates, or you can do it manually in various ways...  If you must use
-ml-, you probably can get better performance by reparametrizing the
function somehow, e.g. maximize -(ln(F/A)^2 or somesuch.

On Tue, Jan 27, 2009 at 11:55 PM, Sergiy Radyakin
<[email protected]> wrote:
> Dear All,
>
> I am solving equation F(x) = A, e.g. F(x) = -0.065
>
...
> I am using Stata's -ml- command to maximize -(F(x)+0.065)^2 but it
> gets stuck even after thousands of evaluations of F:
>
> 8947.Requested F(.1054786)=-.0623424094117909
> 8948.Requested F(.1054786)=-.0623424094117909
> 8949.Requested F(.1054786)=-.0623424094117909
> 8950.Requested F(-2.634596)=.2516850686732928
> 8951.Requested F(2.845553)=-.4834788090804468
> numerical derivatives are approximate
> flat or discontinuous region encountered
...
> The graph of F looks like this:
> http://img217.imageshack.us/my.php?image=functionfffpd8.png
> And I need to be able to solve F(x)=A for (A<0)  , which is a "good"
> part of the graph.
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index