Dear Stata community,
When I declare the data to be survival data, I do not know how to specify that time0 is pouchage_days = 0 so that the first observation for each patient is the baseline covariates (thus it should have _t0 = 0 and _t equals the next observation time in days for each patient). In example, there are no entries for _d, _t, and t_0 in baseline row however. Do no know why this is, please help in how to populate these correctly when designating survival options to Stata.
This is the command I have used.
stset pouchage_days, id(id) failure(advanced_adenoma==3) origin(observation==1) scale(1)
Thank you so much for your help.
BW
Roshani
------------------ copy up to and including the previous line ------------------
When I declare the data to be survival data, I do not know how to specify that time0 is pouchage_days = 0 so that the first observation for each patient is the baseline covariates (thus it should have _t0 = 0 and _t equals the next observation time in days for each patient). In example, there are no entries for _d, _t, and t_0 in baseline row however. Do no know why this is, please help in how to populate these correctly when designating survival options to Stata.
This is the command I have used.
stset pouchage_days, id(id) failure(advanced_adenoma==3) origin(observation==1) scale(1)
Thank you so much for your help.
BW
Roshani
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float observation int id float(advanced_adenoma pouchage_days) byte(_st _d) int(_t _t0) 1 1 1 0 0 . . . 2 1 2 2671 1 0 2671 0 3 1 1 3028 1 0 3028 2671 4 1 1 3518 1 0 3518 3028 5 1 2 3882 1 0 3882 3518 6 1 2 4246 1 0 4246 3882 7 1 . 4284 1 0 4284 4246 8 1 2 4470 1 0 4470 4284 9 1 2 4815 1 0 4815 4470 10 1 . 4855 1 0 4855 4815 11 1 2 5051 1 0 5051 4855 12 1 2 5219 1 0 5219 5051 13 1 2 5401 1 0 5401 5219 14 1 2 5590 1 0 5590 5401 15 1 2 5954 1 0 5954 5590 16 1 1 6311 1 0 6311 5954 17 1 2 6675 1 0 6675 6311 18 1 . 6864 1 0 6864 6675 19 1 1 7305 1 0 7305 6864 20 1 2 7753 1 0 7753 7305 21 1 3 8614 1 1 8614 7753 22 1 2 9092 0 . . . 23 1 1 9387 0 . . . 1 2 1 0 0 . . . 2 2 1 1033 1 0 1033 0 1 3 1 0 0 . . . 2 3 . 643 1 0 643 0 3 3 1 1585 1 0 1585 643 4 3 1 2088 1 0 2088 1585 5 3 1 2684 1 0 2684 2088 6 3 1 3422 1 0 3422 2684 7 3 1 3783 1 0 3783 3422 8 3 1 4149 1 0 4149 3783 9 3 1 4513 1 0 4513 4149 10 3 1 5290 1 0 5290 4513 11 3 2 5794 1 0 5794 5290 12 3 2 6620 1 0 6620 5794 13 3 2 7208 1 0 7208 6620 14 3 1 7464 1 0 7464 7208 15 3 2 7691 1 0 7691 7464 1 4 1 0 0 . . . 2 4 1 5085 1 0 5085 0 3 4 1 6198 1 0 6198 5085 4 4 1 6609 1 0 6609 6198 5 4 2 6994 1 0 6994 6609 6 4 1 7203 1 0 7203 6994 7 4 1 7609 1 0 7609 7203 8 4 2 8095 1 0 8095 7609 1 5 1 0 0 . . . end