clean {eha} | R Documentation |
Unnecessary cut spells are glued together, overlapping spells are "polished", etc.
clean(dat)
dat |
A data frame with names enter, exit, event, id, birthdate. |
In case of overlapping intervals (i.e., a data error), "reasonable" changes are made. Everyone may not agree upon what is reasonable, though, so check the code to see exactly what happens.
A data frame with the same variables as the input.
Göran Broström
Therneau, T.M. and Grambsch, P.M. (2000). Modeling Survival Data: Extending the Cox model. Springer.