Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Log-Likelihood of Each Observation


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: Log-Likelihood of Each Observation
Date   Sat, 9 Oct 2004 17:05:38 -0400

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index