Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Goodness of fit for discrete hazard model with unobserved heterogeneity

From   Steven Samuels <>
Subject   Re: st: Goodness of fit for discrete hazard model with unobserved heterogeneity
Date   Mon, 4 Jul 2011 23:56:35 -0500

This is a duration model. Therefore, predicting probabilities of events for individual intervals might not be helpful. Each person contributes one or more intervals without an event, with a final interval that might have a single event or might not (if the observation is censored). Tests of fit for such a model should be patterned after tests of fit for censored survival models.

For example, one can use Stephen Jenkins's -pgmhaz- and estimate a proportional hazards model with gamma frailty or -hshaz- with a finite mixture model of unobserved frailties (both available from SSC). Both, in my opinion, are more appropriate for duration problems than the proportional odds (i.e. odds-ratio) model of -xtlogit- or -xtmelogit-. The problem with the proportional odds model is that the parameters are not invariant to a change of grouping intervals, a problem not shared by the PH model. With small interval-specific hazards or probabilities, however, the PO and PH models will give similar results.

To test fit, add interactions of important predictors with the duration parameters. Or, for parsimony, add interactions with the log of time, where "time" is the interval endpoint value. These are tests of the PH (or PO) assumption. One version of a test for interactions is a stratified analysis, in which the duration parameters differ in groups created from each covariate in turn.

One can also test other augmentations of the model, such as the addition of interactions or, for continuous covariates, using spline functions instead of linear ones. If you have some continuous covariates, then -linktest- is a good omnibus test.

Stephen also fits -stcox- to discrete data. ( If you do that, then you can informally use the goodness of fit procedures, such as residual analysis, that are available after -stcox-.


On Jul 3, 2011, at 11:35 AM, Urmi Bhattacharya wrote:

Hi All,

I am estimating a discrete hazard model with unobserved heterogeneity
( which is statistically significant). Is there any test for goodness
of fit for such a model? I generated the fitted survival function and
compared it with the sample survivor function but it is hardly
satisfactory because a) using the below model I get a predicted hazard
which assumes that the random effect is 0 and b) It is only a visual
comparison and hence not very convincing.

xtlogit school_left childage i.childfemale i.urban i.scstobc
i.casteother i.dadp i.dadm i.momp i.momm wagep wage5 wage8 wage9 distp
distm disth percapcons durat1 durat2 durat3 durat4 durat5 durat6
durat7 durat8 durat9 durat10 durat11, nocons nolog i(childcaseid)

Any suggestions would be really helpful.


Urmi Bhattacharya
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index