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, is already up and running.

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

st: moptimze: what's the difference of these practices

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


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:

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