Necessary and vital concepts like time-dependent covariates, communal covariates, handling of ties, model checking, and sensitivity analysis are introduced in this chapter.
Only a special kind of time-varying covariates can be treated in R by the packages eha and survival, and that is so-called piecewise constant functions. How this is done is best described by an example.
Example 14 Civil status
The covariate (factor) civil status (called x in the R data frame) is an explanatory variable in a mortality study, which changes value from 0 to 1 at marriage. How should this be coded in the data file? The solution is to create two records (for individuals that marry), each ...