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

RE: st: A +ve log-likelihood!!

Subject   RE: st: A +ve log-likelihood!!
Date   Thu, 27 May 2004 17:15:57 +0200

That is simply BRILLIANT!!   Calculating the AIC (& BIC) is exactly why I
spotted the +ve-log-likelihood.

Thanks ever so much.


-----Original Message-----
[] On Behalf Of
Sent: 27 May 2004 16:58
Subject: Re: st: A +ve log-likelihood!!

Amani <> asks:

> I am running an "streg" model with a Lognormal distribution and the 
> log-likelihood of the fitted model turns positive.  I am not sure what 
> happened here.

Two reasons this could happen (neither is an error):

1.  In general -ml- with continuous responses, recall that the likelihood is
a probability DENSITY, not a probability.  As such, when the scale is small
enough, the probability density can be greater than one, hence the
likelihood is greater than one, hence the log-likelihood is positive.

2.  In -streg, lognormal()- a constant term (does not depend on the
parameters) is added to the log-likelihood so as to make it directly
comparable to other log-likelihoods such as the Weibull and Exponential,
which themselves make the above constant-term adjustment so as to be
invariant to scale.

That is, we adjust Weibull and Exponential so that if you multiply the
survival times by a constant, you get the same log-likelihood.  However, in
doing so, you have to make the same adjustment to log-normal and the other
-streg- models so that you can compare log-likelihoods across all, calculate
things like AIC and BIC, etc.

In any case, if Amani wants the actual based-on-probability-density
log-likelihood, he can do the following after running -streg, dist(lnormal)-

   . gen temp = sum(_st*_d*ln(_t))

   . scalar real_ll = e(ll) - temp[_N]

   . di scalar(real_ll)

*   For searches and help try:
*   For searches and help try:

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