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

Re: st: graphs - help

Subject   Re: st: graphs - help
Date   Mon, 24 Feb 2003 07:31:31 -0500

Many thanks for your help. It works well now but I have another question. You add the option alpha1 when predictiong the hazard after running the model with heterogeneity- predict h_frailty, hazard alpha1. Does that mean that you assume shared frailty?

In my data, I have no reason to believe that there is shared frailty. Should I use alpha1, unconditional or no option at all?

Thank you

Eldira <> asks:

> I am running two Gompertz models: one without considering heterogeneity -
> xi: streg i.marstat i.occup, dist(gompertz) robust hr

> and the other when I take heterogeneity into account as follows (e.g.):
> xi: streg i.marstat i.occup, dist(gompertz) frailty(gamma) robust hr

> After this, I would like to have a graph showing the 2 baseline hazard
> curves when considering the heterogeneity and when not considering it.

In frailty models, there is a distinction between the individual hazard (that
faced by individuals) and the population hazard (the average hazard over the
whole population).  A common phenomenon with such models is that the individual
hazard may be ever-increasing, yet the population hazard begins to fall past
a certain point.  This is known as the frailty effect -- after some time only
the most robust individuals remain in the population and thus their average
hazard is quite small.

That being said, in models without frailty the indiviual and population hazards
are the same, and thus it is fair to compare the estimated hazard from a 
standard model to either of the two hazards from the frailty model.  Suppose 
you are comparing individuals hazards, in which case

  . xi: streg i.marstat i.occup, dist(gompertz) robust hr
  . foreach v of varlist _I* {
    2. replace `v' = 0
    3. }
  . predict h_standard, hazard
  . xi: streg i.marstat i.occup, dist(gompertz) frailty(gamma) robust hr
  . foreach v of varlist _I* {
    2. replace `v' = 0
    3. }
  . predict h_frailty, hazard alpha1
  . graph twoway line h_standard h_frailty _t, sort

will do the trick.  Of course, I relied on the fact that all of Eldira's
regressors were indictators generated by -xi-, meaning I could replace their
values at will knowing that they would be restored the next time -xi- was
called.  In general, you would have to copy the values of your regressors to
variables with other names, set the original regressors to zero (baseline),
predict, then restore the original regressors' values before running the
second regression.

Finally, if you want to compare population hazards instead, simply omit the
-alpha1- option in the second call to -predict-.


*   For searches and help try:

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