I am not sure whether that's directly possible in a generic way, but
you can hack your favorite routine that does the maximum likelihood
(it would probably be called *_ll.ado), find the line that looks like
replace `lnf' =
and add a line like
replace lnf =
provided this variable was defined prior to the call to -ml-. Then by
the end of the party lnf should contain something like the likelihood
near maximum. It may be a little bit off the maximum if the last call
to the program that defines the likelihood was to compute the
derivatives.
What is the test about? There should be an official way to save the
likelihood scores with -score- function, if that helps.
On Sat, 09 Oct 2004 16:44:18 -0400, Marc F. Bellemare <[email protected]> wrote:
> Dear colleagues:
>
> I was wondering if anyone knew how to generate a variable equal to the
> log-likelihood of a model just evaluated (either when using the ml subset
> of command or not). I would need such a variable to compute the test
> statistic for a Vuong (1989) test.
--
Stas Kolenikov
http://stas.kolenikov.name
*
* 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/