Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Tim Evans <Tim.Evans@wmciu.nhs.uk> |
To | "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |
Subject | st: time varying covariate Cox regression |
Date | Wed, 8 Feb 2012 17:24:26 +0000 |
I have a time varying covariate that I am using in a Cox regression which relates to stage at diagnosis for a particular cancer type. The accepted view is that later stage tumours will have higher hazard ratios. However I have a variable with three levels that purports to suggest that later stage tumours will actually reduce the hazard ratio. I think this is being confounded by a larger number of earlier stage tumours. What I would like to know is how do I treat a categorical variable that varies with time since I don't appear to be able to use the i. prefix when using tvc. My code is thus: foreach var of varlist DELAY_* TDELAY_1 { stcox `var' age i.ttype i.grade SEX2, tvc(TCATOG2 sizegrp) } Output: ------------------------------------------------------------------------------ _t | Haz. Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- main | DELAY_1_NEW | 1.157908 .0788916 2.15 0.031 1.013162 1.323332 age | 1.053658 .0038644 14.25 0.000 1.046111 1.06126 | ttype | 2 | 2.079459 .2228057 6.83 0.000 1.685573 2.565389 3 | 1.635624 .1590821 5.06 0.000 1.351745 1.979119 | grade | 2 | 1.23092 .104672 2.44 0.015 1.041952 1.454161 3 | 2.162566 .2359455 7.07 0.000 1.746222 2.678176 | SEX2 | 1.171438 .0926916 2.00 0.046 1.003152 1.367955 -------------+---------------------------------------------------------------- tvc | TCATOG2 | .956024 .0074053 -5.81 0.000 .9416196 .9706488 sizegrp | 1.001568 .0038096 0.41 0.680 .9941292 1.009063 ------------------------------------------------------------------------------