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: moptimze: what's the difference of these practices


From   Sun Yutao <[email protected]>
To   <[email protected]>
Subject   st: moptimze: what's the difference of these practices
Date   Wed, 14 Nov 2012 19:05:02 +0100

Hi,

I¡¯m working with -moptimize()- and I just want know what¡¯s the difference 
between directly using the parameter feed by the -moptimize()- and 
using -moptimize_util_xb()-

I have a callback function say: feval(M,p,v) and when I'm using the p directly 
to compute the log-likelihood it always says "could not calculate numerical 
derivatives -- flat or discontinuous region encountered", but according to the 
help file: " The second argument, b (p in my function), is the entire 
coefficient vector". Here is an example of how I would compute the 
xb: -xb=XB*p[1::4]':+p[5]-   (4 x*b + a cons)

But when I switch to -xb=moptimize_util_xb(M,b,1)-, everything is ok again...

Does anyone know the difference of these two?

Best regards,
Sun Yutao




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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