join.spells {eha} | R Documentation |
Unnecessary cut spells are glued together, overlapping spells are "polished", etc.
join.spells(dat, eps = 1.e-8)
dat |
A data frame with names enter, exit, event, id. |
eps |
Tolerance for equality of two event times. |
In case of overlapping intervals (i.e., a data error), the appropriate id's are returned.
A data frame with the same variables as the input, but individual spells are joined, if possible (identical covariate values, and adjacent time intervals).
Göran Broström
Therneau, T.M. and Grambsch, P.M. (2000). Modeling Survival Data: Extending the Cox model. Springer.