- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I want to evaluate the effect of a treatment on the rate of a recurrent event (groupe=1 treatment, groupe=0 control), under the assumptions that the recurrent events are dependent and there is heterogeneity, the 'conditional frailty model' is recommended (Box-Steffensmeier, 2005)
I know how to fit a shared frailty model using phreg:
proc phreg data=table;
class groupe id;
model time*Status(0)=groupe ;
random id;
run;
with the variable time = time from the beginning of the trial
and Status=1: event occurence
But how do I fit a conditional frailty model? Do I just use the gaptime (time from the last event) instead of time?
Thanks
Fabienne
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Ok since no one has answered yet, I'll share what I learned for other people who might be interested.
There's an R package that fits frailty models:
'frailtypack'CRAN - Package frailtypack
It is very helpful cause it allows to compare the resulting AIC from different frailty distributions 'gamma, exponential, weibull..' to determine the best fit for the data.
To fit a conditional frailty model using R , you can even use the standard 'coxph' with a frailty term while stratifying for the number of the event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There is also this possibility:
You can split you data up in intervals, such that it doesn't look like recurrent event data. Then if you have an event, the next record will be left-truncated at the time of the first event. If one more event happens the next record will be left-truncated at the time of the second event, and so on. Notice that the cox-regression model is not violated by the fact that same indiviual contribute with several records, since the intervals for each person will not overlap.
the procedure will be something like this,
proc phreg data=longtable;
class groupe id;
model (lefttrunctime time)*Status(0)=groupe ;
strata id;
run;
where longtable is a derived dataset, with as many records for each individual as there are events for this individual.
There is also the variant where you start the time from zero at each event, and use the time since last event as underlying time. This is not exactly the same model. (you can read about this difference in ("The statistical analysis of recurrent events" by richard J. cook and Jerald F lawless).
I hope this make sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would like to make a comment more about the model where you put the time to zero at each event. It is a legal model, and easy to handle compared to the model where you use the original timescale. This is so because you avoid the lefttruncations. But, the underlying time is not the same, which it almost no problem if it is acceptable in your context. Though, I see one problem: namely that the time to first event is (perhaps) measured from some arbitrary time, wheareas time to the next events is measured from an event-time. A partly solution can be to stratify or justify for eventnumber (which is legal since as it belong the the past history).
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Why stratify by the id when you can put id in a 'random statement'? and thus the random statement allows you to do a frailty model that can account for the within-individual correlation between events (adjust for heterogeneity )
Ok I think this the code for the conditional model proposed by Box-Steffensmeier :
proc phreg data=table;
model (time0 time1)*status(0) = groupe;
random id
strata event;
run;
It's a conditional model that stratifies by the number of events/ assumes that it is not possible to be at risk for a subsequent event without having experienced the previous event (i.e. you can not be at risk for event 2 without having experienced event 1), but with a frailty (random) term.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I agree. id should be in random, otherwise the model is much too flexible the paramers can not be identified.