Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to set up a time-dependent Cox model in Stata?

    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

  • #2
    If you have tested the validity of the proportional hazards assumption, and it does not hold, you are right to assume that Cox model results will be invalid.

    You could enter time-varying covariates in the tvc() option, or conduct parametric survival analysis, through
    Code:
    streg

    Comment


    • #3
      So in that topic, there are three types of patients
      A) Started on dialysis ------->. Outcome
      B) Started on dialysis ---> Good kidney ---> Outcome
      C) Started on dialysis ---> Poor kidney ---> Outcome

      What we want to do is merge patient types A and B so essentially this group (A) would have maybe 25% receiving kidneys. The comparator group (B) would be patient type C.

      My question would be should I generate the tvc as per the group or some other way. Since at the start of the study we dont know which strategy a patient will take?

      OR should this be done as three separate analysis - comparing patient A vs B, then B vs C then A vs C.

      I believe time varying covariates are necessary since for patient type B and C, there is a lag till transplant essentially an immortal time bias. But then do we need to account for that wait time, somewhere in the formula. Would that be the time mulitplier in the model with tvc

      Comment


      • #4
        The direct answer to your question is to use an "episode splitting" (also known as "time splitting") approach using stsplit. Google something like "stata time-varying survival stsplit" to find more information.

        However, I suggest you consult a statistician familiar with such analyses since the are a lot of issues to consider. It's clear you understand this, but if you were to consult me I would ask you a lot of questions before I were willing to suggest an analysis strategy. My first question would be "what's the outcome"? Next question is what's the study design? I'm assuming it's observational so I would have a bunch of questions about treatment decisions and how and why patients end up in group A, B, or C.

        Comment


        • #5
          I see. let me try to answer some of your questions and maybe we can at least get on the right path.

          Outcome: Survival

          Study design: Observational retrospective.

          The GROUPS
          Everyone starts on dialysis. Some stay on it forever as they wait for a kidney transplant and experience the outcome (A), other get a kidney. Some get a good one (B) and others get a bad one (C).
          A) Started on dialysis ------->. Outcome
          B) Started on dialysis ---> Good kidney ---> Outcome
          C) Started on dialysis ---> Poor kidney ---> Outcome

          Good/poor kidney is based on features of the donated kidney. The decision to use a poor kidney is based on the doctor's comfort and experience (can't really be captured in that dataset).

          The GOAL is to compare two strategies

          People who were in arm A were essentially waiting for a good kidney i.e they would have in time become patients in arm B. Alternately the surgeon could after some time (maybe 1 year on dialysis) say that there is a poor kidney available and it might suit you so lets go with that (arm C). The hope is to compare the following two strategies in terms of survival.
          Strategy#1: Stay on dialysis and possibly get a good kidney
          Strategy#2: Stay on dialysis, agree to a poor kidney and then live on (to die in the future eventually)

          What are your thoughts and how would you define treatment here with episode splitting.

          Comment


          • #6
            Thanks for the clarification. That's much clearer. This is an interesting and very challenging analysis. This will be my last post in this thread. My assessment is that traditional methods will not be sufficient and you will need to use, for example, G methods (see, e.g., https://cdn1.sph.harvard.edu/wp-cont...ns_30mar21.pdf ).

            Even then, you will need data on confounders at each time point in the follow-up. It's possible your study does not contain the necessary data to be able to address your research question (e.g., you already mention that you don't have data on doctor's experience). I'm a statistician with no clinical training; I work primarily with cancer and don't have much experience with renal failure so please excuse any mistakes.

            Treatment allocation is dynamic so you will need information collected over the follow-up; it doesn't have to be continuous but data at multiple time-points in the follow-up. One key variable is, "is a poor kidney available?". Or maybe there are always poor kidneys available (my lack of clinical knowledge is a barrier here)? It seems that if there isn't a kidney available, then there isn't a decision to be made so those data are not informative. For the person-time when a poor kidney is available, you will need data on the factors that influence whether or not to proceed with a transplant or remain on dialysis. You already mentioned surgeon's experience is one such factor but I'm guessing there are other factors that are considered such as patient's general health and how they are responding to dialysis. Another aspect is that I imagine the appropriateness of donor kidneys is continuous rather than a poor/good dichotomy; do you have additional data? In short, you need data (collected over time) on all factors that are associated with both the choice of treatment strategy and the outcome (it would seem that surgeon experience, patient health, renal health are such factors but there may be more).

            I hope my contribution has been helpful. My advice is to locate a statistician with expertise in causal inference. My guess is that you'll need to spend a lot of time with them discussing these type of questions before an analytic strategy can be formulated.

            Comment

            Working...
            X