Dear Statalist.
If I setset data with a time variable “time”, can I then include a variable “age” in the model that is identical to “time” in a Stcrreg competing risk regression?
Or is this incorrect since time is already accounted for in the stcrreg model through stset?
Example data structure:
A search on Statalist revealed that if one stsets with “time”, then “age” should be excluded in parametric models such as the streg weibull. These models already let the hazard change over time so the variable “age” is already in the model even if one does not include it. But is this also the case for the semi-parametric stcrreg model? Should “age” be excluded from the stcrreg model stset with “time” to avoid time being entered twice?
Any insight on this would be greatly appreciated.
Regards,
Erik
If I setset data with a time variable “time”, can I then include a variable “age” in the model that is identical to “time” in a Stcrreg competing risk regression?
Or is this incorrect since time is already accounted for in the stcrreg model through stset?
Example data structure:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(id time age x1 x2 competing_risk) 1 1 1 1 0 0 1 2 2 1 5 0 1 3 3 1 6 0 1 4 4 1 0 1 2 1 1 0 0 0 2 2 2 0 0 0 2 3 3 0 2 2 3 1 1 1 4 0 3 2 2 1 5 0 end
Code:
stset time , failure(competing_risk == 1) id(id)
Code:
stcrreg age x1 x2, compete(competing_risk == 2)
Any insight on this would be greatly appreciated.
Regards,
Erik