[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Log-Likelihood of Each Observation
You would not generate a variable (althought you could if you really wanted to). After any estimation command a number of statistics are temporarily stored. You can see which by looking in the manual or type -ereturn list-. In the example below you can see that the log likelihood is stored in e(ll). You can use that in your calculations. See -help return- and the manual entry for return for more information.
. sysuse auto
(1978 Automobile Data)
. quietly logit foreign weight mpg
. ereturn list
e(N) = 74
e(ll_0) = -45.0332095569914
e(ll) = -27.17515619914122
e(df_m) = 2
e(chi2) = 35.71610671570034
e(r2_p) = .3965529779806182
e(depvar) : "foreign"
e(cmd) : "logit"
e(crittype) : "log likelihood"
e(predict) : "logit_p"
e(chi2type) : "LR"
e(b) : 1 x 3
e(V) : 3 x 3
. di e(ll)
From: Marc F. Bellemare [mailto:firstname.lastname@example.org]
Sent: Sat 10/9/2004 10:44 PM
Subject: st: Log-Likelihood of Each Observation
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.
Marc F. Bellemare
Department of Applied Economics and Management
Ithaca, NY 14853-7801
* For searches and help try: