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

Re: st: Multiple Failures and Frailty


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Multiple Failures and Frailty
Date   Fri, 30 Apr 2004 10:01:59 -0500

Giorgio ? <ricchiuti.g@tiscali.it> asks:

> Mario Cleves, www.stata.com/support/faqs/stat/stmfail.html, explains the
> variance-covariance approach to analyze the multiple failure data. I have a
> dataset with 26 subjects and multiple-failures for each subject and I need
> to estimate a cox model with failty.  Does anyone know whether the following
> commands are correct to implement a frailty model with multiple-failure
> data?

> stset time, fail(event) id(country) exit(time .) origin(time0) 
> stgen nf=nfailure()
> stcox grow trade deficit laggrowthexp diffrer, shared(nf) efron nohr

> or should I use 

> stcox grow trade deficit laggrowthexp diffrer, shared(country) efron nohr

When you specify -shared(varname)- in -stcox-, you are specifying that the
subjects grouped according to -varname- are correlated and that you wish to
model the correlation as random effects.  As such, what correlation do you
wish to model?  Is it the correlation among the first failures for all
subjects, the second failures, etc., in which case the first form is what you
want.  Or is it the correlation among those within the same country, in which
case the second form is what you want.

Incidentally, when one uses the failure number in these types of models, they
stratify on this number so as to posit a different baseline hazard for the
process that generates the first failure, the second, etc.  That is not to say
that you can't group on failure number in a shared frailty model, just that it
is not something I've seen very often.

One other option is that you could combine both concepts and stratify on
failure number and specify shared frailty on -country-, but such a model is
currently not supported in Stata.  A useful alternative would be to stratify
on failure number (thus specifying different baseline hazards for each ordered
failure) and account for the correlation within each country by specifying
-cluster(country)-.

  . stcox grow trade deficit laggrowthexp diffrer, shared(country) strata(nf)

The difference between -cluster(country)- and -shared(country)- mirrors that
for linear models, i.e. -regress, cluster(group)- vs. -xtreg, id(group) re-.
The first fits a pooled model and adjusts standard errors to account for the
correlation within country, the second models the correlation directly via
random effects.

--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/



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