Hello everyone,
I need to conduct an analysis, but the exposure can occur after the origin time. I have been told that I need to use a time-dependent Cox model but I am not sure how to set it up.

Question: I want to compare two strategies for patients on dialysis a) start on the wait list and get a poor quality kidney b) start on the waitlist and POTENTIALLY get a good quality kidney. The main outcome is death/ survival.

I know a standard Cox model is incorrect because the exposure (transplant) occurs after the person being on the waitlist. And the amount of time spent on the waitlist is very very variable. If I conduct a standard Cox model, it will subject group A to an immortal time bias. So essentially we have two groups (A and B) and three paths (Dialysis for life / Dialysis then good kidney/ Dialysis then bad kidney). What would be the best way to set up a time-dependent model for this research question.

Really appreciate any help
Hafeez MS