Example 5: Cox Model with Time-Dependent Covariates

Overview. This example is based on a data set reported by Pike (1966) describing the survival times for two groups of rats that had been exposed to a carcinogen. Open the Pike.sta data file via the File - Open Examples menu; it is in the Datasets folder. Shown below is a partial listing of that file.

Suppose we suspect that the effect of the treatment (exposure to carcinogen, coded in variable Group) on the underlying hazard is not constant; that is, that the proportionality assumption may be violated. To test whether this assumption is tenable, a model will be fit to the data that includes both the fixed covariate Group as well as a time-dependent variable defined as Group * (Log(Time)-5.4). Note that the value 5.4 is used for scaling purposes here, since the mean of the log-survival times is approximately equal to 5.4.

Specifying the Analysis. Select Survival Analysis from the Statistics - Advanced Linear/Nonlinear Models menu to display the Survival and Failure Time Analysis Startup Panel. Double-click Time-dependent covariates to display the Proportional Hazard Model with Time-Dependent Covariates dialog.

Click the Variables (survival times, censoring [optional] grouping) button to display the standard variable selection dialog. Here, select variable Survival as the Survival (1, 2 or 6), variable Censored as the Censoring variable, and then click the OK button. Double-click in the Code for complete responses field to display the Variable 2 dialog. Here, select Complete and click the OK button. In the same manner, double-click the censored field and select Censored.

Specifying Time-Dependent Covariates. The dialog shown above has two editable (and scrollable) fields. The left column (Covariate) can be used to enter a label for the covariate that will be used later in the output. The right (wider) column (Expression) can be used to define the respective covariate via an arithmetic expression.

Rather than typing in the names of the covariates, begin by clicking the Select variables button under Independent variables (covariates) and a standard single variable selection dialog is displayed. The variables that you select here will be automatically transferred into both edit fields, i.e., into the Covariate field and the Expression field. Thus, this is a quick way to specify fixed covariates, or to transfer variable names one wants to transform into the edit fields. Select the Group variable and then click the OK button. Variable Group will be transferred into the first line of the edit fields.

Repeat the selection of variable Group, and identical text will appear in the second line of the edit fields; then modify the second line as shown below.

Note that the text in the second line past the semicolon will be interpreted as a comment, so you can annotate your formulas. Also, for repetitive analyses you can save and retrieve definitions via the Save expressions and Open expressions buttons, respectively.

Reviewing the Results. Click the OK button to begin the analysis. The Model Parameter Estimation dialog is briefly displayed. After the best parameters have been found by STATISTICA, the iterative procedure stops and the Regression Results dialog is then automatically displayed. Click the Summary: Parameter estimates button on the Quick tab.

As you can see, the parameter estimate for the time-dependent covariate is much smaller than its standard errors, and not statistically significant. Thus, the model with the single fixed covariate does not appear to be inappropriate.

See also, Survival Analysis Index.