?=================================================================== ? HETEROGENEITY IN LOG-LINEAR DURATION MODELS = ? = ? User must define the data matrix with the following line: = ? = ? NAMELIST ; X = ... $ = ? = ? User's dependent variable is Y. Change the following line = ? = ? CREATE ; LOGT = log of the duration variable $ = ? = ? Model to be estimated: = ? = ? STRING ; ST0 = model $ (e.g., WEIBULL) = ?=================================================================== ? ? The following is a LIMDEP program for correcting the estimated standard ? errors in the log-linear duration models for the possibility of hetero- ? geneity. Reference is made to Kalbfleisch and Prentice, page 55 for the ? computation formulas and Gourieroux, Monfort, and Trognon, Econometrica, ? May, 1984, page 682 and thereabouts for the theory underlying the matrix ? results used. (Note a sign change viz a viz K&P. Their z(i) is -x(i) here. ? ? Theory: Under certain conditions (see GMT) an appropriate asymptotic ? covariance matrix for a 'pseudo maximum likelihood estimator' can be ob- ? tained by using ? V = inv(J) * I * inv(J) ? ? where J is the negative expected Hessian of the pseudo-log-likelihood ? and I is the expected outer product of the first derivatives. (I is the ? inverse of the BHHH estimator.) ? Since the Hessian is saved by Newton's method and the BHHH estimator by ? the DFP method, it is simple to obtain the desired covariance matrix. ? The following will compute V. ? ? We first obtain the BHHH estimator. Use ;PAR to retain the full set of ? estimates ? Survival ; Lhs = logt ; Rhs = X ; Model = "ST0" ; PAR $ Matrix ; I = sinv(VARB) $ ? ? We now reestimate the model to obtain the Hessian. No need to do the full ? set of computations, just use the known MLE's as the starting values so as ? to converge in one iteration. Survival ; Lhs = logt ; Rhs = X ; Model = "ST0" ; PAR ; ALG = N ; START = b,s $ Matrix ; J = VARB $ ? The corrected covariance matrix is simply JIJ. We compute it and compare ? the results to those we had previously. Matrix ; V = mprd(J,I,J) ; Stat(b,varb) ; Stat(b,V) $