User Guide

107
Chapter
12
Computing Time-Dependent
Covariates
There are certain situations in which you would want to compute a Cox Regression
model but the proportional hazards assumption does not hold. That is, hazard ratios
change across time; the values of one (or more) of your covariates are different at
different time points. In such cases, you need to use an extended Cox Regression
model, which allows you to specify time-dependent covariates.
In order to analyze such a model, you must first define your time-dependent
covariate. (Multiple time-dependent covariates can be specified using command
syntax.) To facilitate this, a system variable representing time is available. This
variable is called T_. You can use this variable to define time-dependent covariates in
two general ways:
If you want to test the proportional hazards assumption with respect to a particular
covariate or estimate an extended Cox regression model that allows
nonproportional hazards, you can do so by defining your time-dependent
covariate as a function of the time variable T_ and the covariate in question. A
common example would be the simple product of the time variable and the
covariate, but more complex functions can be specified as well. Testing the
significance of the coefficient of the time-dependent covariate will tell you
whether the proportional hazards assumption is reasonable.
Some variables may have different values at different time periods but aren’t
systematically related to time. In such cases, you need to define a segmented
time-dependent covariate, which can be done using logical expressions.
Logical expressions take the value 1 if true and 0 if false. Using a series of logical
expressions, you can create your time-dependent covariate from a set of
measurements. For example, if you have blood pressure measured once a week for