O'Reilly logo

Event History Analysis with R by Göran Broström

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

More on Cox Regression

5.1 Introduction

Necessary and vital concepts like time-dependent covariates, communal covariates, handling of ties, model checking, and sensitivity analysis are introduced in this chapter.

5.2 Time-Varying Covariates

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required