[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
siyama@who.int |

To |
statalist@hsphsun2.harvard.edu |

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. Amani -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of rgutierrez@stata.com Sent: 27 May 2004 16:58 To: statalist@hsphsun2.harvard.edu Subject: Re: st: A +ve log-likelihood!! Amani <siyama@who.int> 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 estimated 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) --Bobby rgutierrez@stata.com * * 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/ * * 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/

- Prev by Date:
**Re: st: A +ve log-likelihood!!** - Next by Date:
**Re: st: Adding R-Squared to sw command output** - Previous by thread:
**Re: st: A +ve log-likelihood!!** - Next by thread:
**st: Adding R-Squared to sw command output** - Index(es):

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