Hi everyone,
I'm working to use -stpm2cr- to fit a flexible parametric model for survival data. -stpm2- worked so well and was appreciated by my committee, so I've proposed to use this approach for my analyses that involve competing risks. However, I'm getting an error with the code and have not been able to figure out where I'm going wrong.
The error I get says Events (_status) and event indicator (_d) do not match. I think I have stset the data correctly - the Mozumder paper that has the tutorial has all events specified in -stset-. I have the two competing risks specified in the -cause- option and the censored value in -censvalue-. Obviously, something isn't working! I'd welcome suggestions for where I might look next to sort out this error.
Thanks!
I'm working to use -stpm2cr- to fit a flexible parametric model for survival data. -stpm2- worked so well and was appreciated by my committee, so I've proposed to use this approach for my analyses that involve competing risks. However, I'm getting an error with the code and have not been able to figure out where I'm going wrong.
Code:
stset tevent2outcome, id(PID) failure(status3yr==1, 2, 3) exit(time 36)
* status3yr: CV Outcome = "1", Death = "2", End of Follow-Up or Censored at Study End = "3"
stpm2cr ///
[CV Outcome: study_grp, scale(hazard) tvc(study_grp2) dftvc(5)] ///
[Death: study_grp, scale(hazard) tvc(study_grp2) dftvc(5)], ///
events(status3yr) cause(1 2) censvalue(3) eform level(95)
Thanks!

Comment