Announcement

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

  • General question about Cox regression

    I have a group of patients that have stopped taking treatment at one health facility (say Facility A) and I am trying to find out the factors associated with transferring to another facility (Facility B) after they stop. I am using a Cox regression model with the starting point being the patient's last visit at Facility A and the endpoint being the first visit at facility B or else the data is censored. I'd like to know if patients are more likely to transfer the longer they stay out of care. Would it be right to include a categorical variable such as time since the last appointment at facility A or is this problematic as it is derived from the outcome variable?

  • #2
    No, Cox regression is about time to event analysis. Such analyses need care in dataset preparation. The data matrix feeds the model about the length of risk one is exposed to. In your case, the length of time (measured in time unit minute/hour/day/month/year) patient stay out of care is the time variable and the dataset need to be prepared for each patient by adding multiple rows until a patient experienced the event (when the patient transfer). I suggest you read first about time to event analysis.
    Roman

    Comment


    • #3
      Would it be right to include a categorical variable such as time since the last appointment at facility A or is this problematic as it is derived from the outcome variable?
      Yes, I believe it is appropriate to "include" such a variable but it should be included as the time variable. As Roman said, this is your time variable. As you said, it is also one dimension of the outcome (the other being the event indicator). Time is assumed to be continuous, not categorical, in the Cox model. If you only have discrete values of time then I would suggest considering a different model.

      Your data could be set up as follows:

      entry: date of last treatment at facility A
      exit: date of exit (either day of treatment at facility B or date of censoring)
      event indicator: transfer (1 if transfer, 0 if censored)

      You would then use:

      Code:
      stset exit, failure(transfer) origin(entry) scale(365.24)
      The scale() option is optional, it just scales the time units from days to years.

      You could then use the following:

      Code:
      sts graph, hazard kernel(epan2)
      This gives you a graph of the instantaneous rate of transfer as a function of time since last appointment at facility A. The shape of the hazard will give you insight into your question "I'd like to know if patients are more likely to transfer the longer they stay out of care".

      You can then fit a Cox model to study "factors associated with transferring to another facility".

      Comment

      Working...
      X