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

st: mistake in weibhet_glfa

From   <>
Subject   st: mistake in weibhet_glfa
Date   Thu, 22 Aug 2002 08:12:53 -0700 (PDT)

Dear Statalist,

While doing an extension of the code weibhet_glfa I
found what I believe is a mistake in the
log-likelihood expression of this code. Consider that
the mixed survivor function is given by

Sm(t)= [ 1  theta*ln{S(t)}]^(-1/tetha)               

Where S(t) is the survivor function corresponding to
the case in which there is no unobserved
heterogeneity; and theta is the variance of the gamma
distribution that it has been assumed for the
unobserved characteristic. Now, using the fact that   
          -dln(Sm)/dt = hm(t) I obtain the mixed
hazard function: 

hm (t)= - {S(t)/S(t)}*{1-theta*ln{S(t)}}^(-1)        

Using (1) and (2) I have written down the
log-likelihood obtaining  (in an intermediate
expression that helps comparison) the expression:

Logl = ln{1+theta*exp[-xbp]*t^(p)}^(-(1/theta + d)) +
+ ln{exp[-xbp]*p*t^(p-1)}                            

Where x is the vector of observed characteristics and
&#61538; is its corresponding vector of coefficients.
In the weibhet_glfa code the log-likelihood is written

Logl = ln{1+theta*exp[-xbp]*t^(p)}^(-(1/theta + d))+ 
+ ln {exp[-x&#61538;p]*p*t^(p)}                      

Notice that while in (3) we have a term t^(p-1),  in
(4) the corresponding term is t^(p)  (look in the
second ln(.)). After checking the consistency of (3)
with the log-likelihood that Lancaster (1979) would
write using his own expressions for Sm(t) and hm(t), I
have become to believe that (4) is incorrect and that
the code of  weibhet_glfa requires a slight

Could you double-check my calculations so that I have
a second opinion on the issue?.

Thank you,

Alfonso Miranda
Research Student
Economics Department, University of Warwick.


1. Stata maunal pp. 343-375 (on the st streg code)
2. Lancaster (1979) Econometric Methods for the
Duration of Unemployment. Econometrica 47 (4), pp.

Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
*   For searches and help try:

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