Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72771

Interacting with Time for the Andersen-Gill Formulation of the Cox Model

$
0
0
Hi all,

I have an interesting dilemma. I have a survival dataset that has been formatted using the Andersen-Gill counting process - i.e. multiple lines per patient to accommodate time-varying and time fixed covariates, each time interval per patient indicated with start time and stop time variables, and only one event of interest (this is not a recurrent event analysis). Given I have multiple lines per patient I st set my dataset using the following code:

stset stop, id(studyid) failure(event)

I fit my cox model and checked the proportional hazards assumption using the tvc option like this:

stcox i.drug z1 z2 z3, tvc (z1)

where z1 is a continuous covariate. I wanted to test the z1 interaction with time in days so did not use the texp option.

The p-value for the tvc z1 was >0.05 and the main effect z1 was not significant.

However, I read that using the tvc function is equivalent to creating a new variable that takes z1 and multiplies it with time _t. I generated a new interaction variable: gen z1_t= z1*_t and refitted my cox model using this new variable without the tvc function:

gen z1_t= z1*_t
stcox i.drug z1 z2 z3 z1_t

Doing this led to VERY different results. My z1_t variable is now highly significant <0.0001 and my main effect z1 is also significant.

Can anyone shed some light on this discrepancy? Is this difference due to the Andersen-Gill setup?

Thanks,
C.

Viewing all articles
Browse latest Browse all 72771

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>