[R] multiple destinations in duration (survival) analysis

Greg Snow Greg.Snow at intermountainmail.org
Wed May 24 21:37:38 CEST 2006


I have been working on a similar project and here is how I approached it
(though I would be very happy to hear other ideas):

Our situation was that we wanted to predict length of stay in the
emergency room of the hospital, there are multiple competing places to
go from the ER: released to go home, admitted to the main hospital,
transferred to another specialty hospital, leave without seeing the
doctor, ....  Not suprisingly the predictors have opposite effects on
time till admission and time till released to home.

There is a function "aj" in package changeLOS that computes the
Aalen-Johansen estimator for competing risks, but it does not fit
anything with covariates.  You can also do multiple cox model
regressions using each destination as the event and all other
destinations as censoring, but this does not give some of the nice
interpretations of the Aelen-Johansen estimates, so here is how we
combined the 2 approaches:

1. fit a Cox ph model for each competing risk (using all others as
censoring).  

2. Choose a baseline set of covariates (means of all, or typical values,
...).

3. Compute the predicted survival distribution for this baseline
individual (using survfit on the coxph model) for each of the coxph
models.

4. Simulate 1,000 observations from each of the predicted survival
distributions, put these into a 1,000 by (number of competing risks)
matrix.

5. take the minimum of each row as the time to event and which row has
that minimum as the event that occurred and use that as input to the aj
function (actually I think the trans function is used in there
somewhere, then the aj function).  

6.  Create a plot based on the output of AJ showing at each time period
what the probabilities of being still in the system or any of the
destinations is.

7.  Choose a 2nd set of covariates (generally just change 1 value from
the baseline) and repeate the whole process, compare the 2 graphs to get
a feel for the effect of changing that covariate.

8. Repeate, but changing different covariates to see the effect.


Hope this helps,



-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Dimitri Szerman
Sent: Wednesday, May 24, 2006 9:47 AM
To: R-Help
Subject: [R] multiple destinations in duration (survival) analysis

Hi,

I'm trying to estimate a (parametric) competing risks model in the
context of duration (or survival, if you wish) analysis. That is,
instead of studying the transition of subjects to "death", I wish to
study the transitions to multiple *destinations* (which is different
from studying multiple *durations*, or recurrent events). I am more
interested in the hazard function rather than the survival, but that
would do as some manipulations in the estimates will give me what I
want.

Does any one know were I can find functions/routines to perform such
estimation with R? I'd appreciate any tips on this.

Thanks,
Dimitri

	[[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html



More information about the R-help mailing list