Hello!
I have a dataset of patients with opioid use disorder (OUD) and would like to calculate the time to relapse (in days) for each patient given the data below. Note that some patients have multiple relapses -- what would be the most appropriate way to record the time to relapse for such instances? Your feedback is most welcome.
I have a dataset of patients with opioid use disorder (OUD) and would like to calculate the time to relapse (in days) for each patient given the data below. Note that some patients have multiple relapses -- what would be the most appropriate way to record the time to relapse for such instances? Your feedback is most welcome.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(id date) byte relapse 3 22122 0 3 22123 1 3 22133 0 3 22134 0 3 22135 0 3 22136 0 3 22139 0 3 22140 0 3 22141 0 3 22142 0 3 22143 0 3 22144 0 3 22145 0 3 22146 0 3 22147 0 3 22148 0 5 20442 0 5 20443 0 5 20444 0 5 20447 0 5 20557 0 5 20558 0 5 20559 0 5 20560 0 5 20561 0 5 20566 0 5 20571 0 5 20572 0 5 20577 0 5 20586 0 5 20588 0 5 20589 1 8 19200 0 8 19201 0 8 19202 0 8 19204 0 8 19205 0 8 19206 0 8 19211 0 8 19214 0 8 19215 0 8 19220 0 8 19222 0 8 19224 1 8 19225 0 8 19226 1 8 19227 0 8 19289 1 8 19292 0 8 19314 1 8 19315 0 8 19335 0 8 19336 1 8 19937 0 8 20213 0 9 21520 0 9 21521 0 9 21522 0 9 21524 0 9 21526 0 9 21529 0 9 21530 0 9 21544 0 9 21573 0 9 21574 0 9 21575 1 9 21576 0 9 21578 0 9 21579 0 9 21593 0 9 21616 0 9 21627 0 9 21644 0 10 22165 0 10 22166 0 10 22168 0 10 22169 0 10 22170 0 10 22171 0 10 22173 0 10 22175 0 10 22176 0 10 22177 0 10 22178 0 10 22179 0 10 22180 0 10 22181 0 10 22182 0 10 22189 1 10 22211 1 10 22212 0 10 22214 0 10 22289 0 10 22290 0 10 22291 0 10 22292 0 12 20442 0 12 20443 0 12 20445 0 12 20446 0 12 20448 0 12 20449 0 12 20473 0 12 20474 0 12 20478 0 12 20482 0 12 20489 0 12 20495 0 12 20499 0 12 20500 0 12 20502 0 12 20506 0 12 20507 0 12 20508 0 12 20509 0 12 20521 0 12 20522 0 12 20525 0 12 20531 0 12 20533 0 12 20534 0 12 20537 0 12 20538 0 12 20541 0 12 20542 0 12 20543 0 12 20545 0 12 20550 0 12 20554 0 12 20555 0 12 20562 0 12 20570 0 12 20597 0 12 20614 0 12 20616 0 12 20618 0 12 20643 0 12 20644 0 12 20666 1 12 20667 0 12 20674 0 12 20675 0 12 20677 0 12 20679 0 12 20680 0 12 20681 0 12 20682 0 12 20684 0 12 20685 0 12 20686 0 12 20688 0 12 20689 0 12 20691 0 12 20692 0 12 20695 0 12 20696 0 12 20699 0 12 20706 0 12 20712 0 12 20713 0 12 20716 0 12 20718 0 12 20719 0 12 20726 0 12 20733 0 12 20737 0 12 20739 0 12 20740 0 12 20744 0 12 20745 0 12 20746 0 12 20747 0 12 20751 0 12 20752 0 end format %td date
Comment