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: moptimize lf2 evaluator syntax -- manual wrong again?


From   László Sándor <[email protected]>
To   [email protected]
Subject   st: moptimize lf2 evaluator syntax -- manual wrong again?
Date   Sat, 27 Feb 2010 20:06:41 -0500

Hi all,

Am I right that the manual's example on an lf2 evaluator for
-moptimize- won't run, as 'fv' is a vector here, while
-moptimize_util_matsum- expects a scalar as its last argument?
                if (todo>=1) {
                        s1  = z:/s
                        s2  = z:^2 :- 1
                        S   = (s1, s2)
                        if (todo==2) {
                                h11 = -1:/s:^2
                                h22 = -2*z:^2
                                h12 = -2*z:/s
                                H11 = moptimize_util_matsum(M, 1,1, h11, fv)
                                H22 = moptimize_util_matsum(M, 2,2, h22, fv)
                                H12 = moptimize_util_matsum(M, 1,2, h12, fv)
                                H   = (H11, H12 \ H12', H22)
                        }
                }
(From: http://www.stata.com/help.cgi?mata+moptimize() )

Also, there is a parenthesis missing in fv's defining line: fv  =
ln(normalden(y1:-p1, 0, s)

Thanks,

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