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/