[R] Episode splitting with qualitative covariates

M. Damman M.Damman at student.rug.nl
Fri May 8 11:37:30 CEST 2009


Dear R-users,

To test the effect of training (a time-varying qualitative 
covariate) on the transition to management rate by means 
of event history models, I would like to split my data by 
the training date.

Excerpt of my data:

   StatusN Duration DummyOtherEp TimingOtherTraining
1       0     1178            0               10000
2       1       45            0               10000
3       1     1209            0               10000
4       1     2235            1                 250
5       0     2411            0               10000

With:
-	StatusN: event (=1) or right-censored (=0).
-	Duration: time until the transition to management or 
until the end date of data collection.
-	DummyOtherEp: whether someone had training during the 
episode (=1).
-	Timing other training: training date relative to the 
beginning of the episode (employees without training 
received the value 10000).

I tried to use survSplit to do the episode splitting, but 
that does not work. E.g.:

split1 <-survSplit(babyfile,cut="TimingOtherTraining", 
end="Duration", event="StatusN",
start="start", episode="i")

Does anyone know how to split episodes with qualitative 
covariates in R? Thanks in advance.

Marleen Damman




More information about the R-help mailing list