Dear Stata Forum,
in the sake of others I’d like to pick up this topic again and answer one of the questions of myself.
No, this is not the case if you have data that is initially setup like a panel. What I wanted to obtain is a survival model where an individual joins the sample and will a) either survive till the end (this is what we call right censoring) or b) experience an event. If you want to obtain this you should setup you data in a way that it includes all observations from the entry of an individual till its final point and specifically identify individuals within the dataset with an ID.
I have done this by:
A good start for everybody having the same issue is the stcox.pdf file for STATA and the book William above has recommended (many thanks!)
2. My second question has changed, as I know that the Cox proportional model is able to estimate the effect of time-varying independent variables on my hazard rate. I have done this by:
stcox x1 x2 x3, tvc(x1 x2 x3) vce(robust)
So now I don’t know if STATA is able to understand that there are multiple failures in my dataset (I hope trough the stset command?) and if the proposed cox model above takes into account “competing risks”? I know that this is not explicitly modeled here like in stcrreg, however like I stated above my peer literature uses only cox proportional models and never uses the Fine and Gray approach - maybe someone is also able to tell me what is the issue in my case with that approach?
Again many thanks for your help!
Regards,
John
in the sake of others I’d like to pick up this topic again and answer one of the questions of myself.
1. My first question is whether the initial setup of the dataset… is correct?”
I have done this by:
Code:
stset time, id(ID) failure(failcode==1) //1 stands for failure 1
2. My second question has changed, as I know that the Cox proportional model is able to estimate the effect of time-varying independent variables on my hazard rate. I have done this by:
stcox x1 x2 x3, tvc(x1 x2 x3) vce(robust)
So now I don’t know if STATA is able to understand that there are multiple failures in my dataset (I hope trough the stset command?) and if the proposed cox model above takes into account “competing risks”? I know that this is not explicitly modeled here like in stcrreg, however like I stated above my peer literature uses only cox proportional models and never uses the Fine and Gray approach - maybe someone is also able to tell me what is the issue in my case with that approach?
Again many thanks for your help!
Regards,
John
Comment