Hi everyone,

I have a question about the proportional hazard model. My data looks as below:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte id str9 date byte(interval price) float promotion
1 "2020/1/5"   . 50   2
1 "2020/1/9"   4 35   2
1 "2020/1/20" 11 65   3
1 "2020/1/24"  4 40 2.5
1 "2020/1/28"  4 20   0
1 "2020/1/31"  3 25   4
1 "2020/2/15" 15 30   5
2 "2020/1/2"   . 45   1
2 "2020/1/9"   7 23   2
2 "2020/1/11"  2 53   3
2 "2020/1/18"  7 30   4
2 "2020/1/20"  2 25   5
2 "2020/1/26"  6 30   5
end
Variable interval is the time interval between two variables. I want to use this as the dependent variable. But I don't have a "failure" variable here.

I wonder if anyone knows if I can use the proportional hazard model with this data structure? If so, how can I define the "failure" variable?

Thanks alot!