How can I convert my data (time) to a counting process form for time-dependent cox regression analysis?

I am working on time dependent cox regression and I want to convertt my data (time) to t1 t2 form (counting process form)

Is there a code in R to do this? or should I do it manually in excel? it takes a long time

I convert long format and ı split time variable to t1 and t2 with my hand in excel like below. Is it true?

enter image description here



Read more here: https://stackoverflow.com/questions/65708175/how-can-i-convert-my-data-time-to-a-counting-process-form-for-time-dependent-c

Content Attribution

This content was originally published by Cgdmm at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: