Hello,
I have the following data in long-format (i.e. panel data).
and I would like to create _t0 and _t variables for time-varying cox regression analysis. Similar to the below:
Any help would be much appreciated.
I have the following data in long-format (i.e. panel data).
Code:
clear input int idno double duration 4 .09308692676249145 4 .17522245037645448 4 .28473648186173856 4 .38329911019849416 4 .48186173853524983 4 .5913757700205339 4 .8569472963723477 5 .12594113620807665 5 .243668720054757 5 .32854209445585214 5 .4353182751540041 5 .731006160164271 end
and I would like to create _t0 and _t variables for time-varying cox regression analysis. Similar to the below:
Code:
clear input int idno double(duration _t0 _t) 4 .09308692676249145 0 .09308692676249145 4 .17522245037645448 .09308692676249145 .17522245037645448 4 .28473648186173856 .17522245037645448 .28473648186173856 4 .38329911019849416 .28473648186173856 .38329911019849416 4 .48186173853524983 .38329911019849416 .48186173853524983 4 .5913757700205339 .48186173853524983 .5913757700205339 4 .8569472963723477 .5913757700205339 .8569472963723477 5 .12594113620807665 0 .12594113620807665 5 .243668720054757 .12594113620807665 .243668720054757 5 .32854209445585214 .243668720054757 .32854209445585214 5 .4353182751540041 .32854209445585214 .4353182751540041 5 .731006160164271 .4353182751540041 .731006160164271 end

Comment