Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Can a log-likelihood evaluator program obtain the current e(V) or Hessian?


From   "Joseph Coveney" <jcoveney@bigplanet.com>
To   "Statalist" <statalist@hsphsun2.harvard.edu>
Subject   st: Can a log-likelihood evaluator program obtain the current e(V) or Hessian?
Date   Sat, 9 Feb 2008 15:54:33 +0900

I would like to penalize the likelihood with a function of the negative
Hessian.  How can I have the evaluator program for use with ml method -lf-
see the most recent Hessian during each iteration?  I know that -ml
maximize- has it available somewhere, because -ml maximize, hessian- reports
it during iterations.  But a log-likelihood evaluator program (one called
by -ml model lf-) cannot simply put -matrix `penalty' = some function of
syminv(e(V))-, because -ml maximize- doesn't post it or update it until the
end of the run.

I've tried

   ml model lf , , ,
   ml maximize, iterate(1)
   local not_yet 1
   while (`not_yet') {
       matrix define B = e(b)
       ml model lf . . .
       ml init B
       ml maximize, search(off) iterate(1) nooutput
       local not_yet = cond(e(converged), 0, `not_yet')
   }
   ml display

but there are at least two iterations (zero and one) for each call to -ml
maximize , iterate(1)-, each iteration calling the likelihood evaluator
several times, and e(V) doesn't get updated within the -ml maximize- call
before the convergence criterion is met.

Joseph Coveney


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index