I am using the following commands for my set of patients with multiple records and multiple events of "failure":
Code:
replace day = date(t, "DMY") stset day, id(patient) origin(code==1) failure(code==2) exit(time mdy(3,15,2019))
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str2 patient str11 t float(code day) "p1" "1jan2019" 1 21550 "p1" "1mar2019" 2 21609 "p2" "5jan2019" 1 21554 "p3" "10jan2019" 1 21559 "p4" "2jan2019" 1 21551 "p4" "1feb2019" 2 21581 "p4" "3mar2019" 2 21611 end
I choose exit to be a time because my followup period ends March 15, 2019. However, if I look at the values stset generates, it never places patients 2 and 3 into the risk pool (instead, _st is 0). From my understanding, they should enter the risk pool at 5jan2019 (for p2) and 10jan2019 (for p3), and then be censored on March 15, 2019. Am I misunderstanding the risk pool criteria?
Code:
clear input byte(_t _t0 _st _d) . . 0 . 59 0 1 1 . . 0 . . . 0 . . . 0 . 30 0 1 1 60 30 1 1 end
0 Response to Subjects with no failure event not in risk pool, Stset
Post a Comment