Competing risks time-to-event analysis E
I have a time-to-event scenario where I want to look at Covid19 patients.
I want to analyse how long it takes before they are extubated (taken off ventilator) in two different treatment groups. Being extubated is a positive event.
The problem is if they die before they are extubated it is no longer possible to be extubated. So, I believe it is a competing risk scenario but I am not sure?
Would you use a KM plot to compare the two groups?

Based on my knowledge and also on this question I believe you are dealing with a competing risk case. In this situation, using Kaplan-Meier curves would be erroneous because they do not consider the occurrence of the other causes and therefore might over-represent the effect of the treatment leading to misleading conclusions. In this R tutorial you will find fully described example if you are interested.
Your case might be more complex, but here I drew a simple DAG to illustrate how I visualise the problem. In the DAG I include the following nodes:

*

*Treatment.

*Extubation, your outcome.

*Death, your competing risk.

*Hospital transfer, a source of non-informative censoring created by me for the sake of the explanation. Imagine that you are working on data from a hospital, but its capacity it is limited so patients are randomly transferred to a new hospital during the follow-up due to lack of beds. I assume this decision is made at random, but in the real life it might actually might that only mild cases are transferred while the worst cases stay in the hospital as they are not safe to transfer.

*Natural Covid progression. This is the baseline risk for each patient to develop one of the outcomes if Covid wasn’t treated.

The edges (arrows) represent my assumption regarding the causal relationship among the variables. The arrows from the treatment are dashed because your research question is exactly to assess the effect of the treatment on extubation, but also on mortality because if the treatment is beneficial for curing Covid, it means that it also reduces the risk of mortality.
Also, both death and extubation might occur for reasons external to the treatment, such as the natural progression of the illness. I would even say that the risk of death is complementary to the risk of extubation. It is indeed reasonable to think that someone won’t be intubated forever and usually extubation means that, either your health is better or dead occurred. In this sense they are complementary.
Moreover, let’s have a look at the hospital transfer variable. Because I assumed the hospital transfers to occur at random, this variable has no causal relationship with any of the other variables. We still lose subjects to follow-up but the reason is totally unrelated to treatment and outcome, so we call it non-informative censoring.
I would imagine that being intubated for a long time weakens your body and makes recovery less likely. I might be wrong but, in any case, I am quite sure the effect of the treatment on extubation also depends on how long you have been intubated for so I recommend using a time-varying coefficient for the effect of the treatment. There is another tutorial from Terry Therneau titled “Using time dependent covariates and time dependent coefficients in the cox models”.
Finally, I recommend having a look on the personal page of Bendix Cartensen, who worked on survival and multistate models for a long time (competing risk model is special case of multistate). His working-in-progress book “Practical multistate modelling with R and Epi::Lexis” covers this topic.

