Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for time varying covariates (or, start-stop) survival data #2

Open
IyarLin opened this issue Jun 9, 2022 · 7 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@IyarLin
Copy link

IyarLin commented Jun 9, 2022

Hi,

First, many thanks for writing this package - it is of great value to me.

If I understand correctly the package can only handle survival data of the form Surv(time, status).

Would it be a lot of work to generalize that for Surv(start,stop,status) data?

@RobinDenz1
Copy link
Owner

Hello there,

thank you for your question!

Yes you are correct, the package currently only works with time-fixed covariates. The best answer to your question on how much work it would be to generalize it to time-varying covariates is: it depends.

First of all, if the variable of interest changes over time this gets very complex instantly, because the causal question to be answered is unclear in those cases. What exactly should the survival curves display? The survival probability given that everyone was exposed from the beginning? Or some mix of treated - untreated times? There is no obvious answer to this. I also suspect that the syntax needed to perform analyses of this kind would be quite different from what I implemented.

If only some confounders change over time, it is less complicated, but still a lot of work. For the "direct" and "direct_pseudo" methods it should work without any fundamental changes to the methodology, but it would require quite some code-refactoring. I am not sure how IPTW or AIPTW based methods could handle this, but there is probably some literature on this somewhere.

What exactly are you trying to do? I might be able to offer a "quick and dirty solution" depending on what your problem is. I am however not going to implement general support for time varying covariates soon, because I am currently working on a second R-package that can handle continuous variables of interest.

@RobinDenz1 RobinDenz1 added the enhancement New feature or request label Jun 9, 2022
@RobinDenz1 RobinDenz1 self-assigned this Jun 9, 2022
@IyarLin
Copy link
Author

IyarLin commented Jun 13, 2022

The use case I have in mind is comparing exposure from the beginning to non exposure from the beginning. I'm using a propensity stratification approach where I divide start-stop intervals to different treatment incidence groups.

I'd like to somehow take weighted combinations of those curves in the control and treatment groups to get ATC and ATT (so if the treatment groups has more tendency to be in one of those groups in certain times it will inherit more of it's survival from that curve).

In binary treatment and continuous/binary outcome it works fine. Survival outcome always has to be so complicated =/

@RobinDenz1
Copy link
Owner

That sounds like a very interesting problem, but I sadly don't know a solution to it right now.

You said that this is not a problem for binary treatments and continuous/binary outcomes. Could you perhaps cite some of the papers that describe these methods in those scenarios here? I would like to take a look at them. Maybe I can do something similar for the adjustedCurves package in the future.

@IyarLin
Copy link
Author

IyarLin commented Jun 15, 2022

Hi, this is a short summary of the propensity score stratification approach:

Propensity stratification divides the observations into strata that have similar propensity scores, with the objective of balancing the observed variables between treated and control units within each stratum. The treatment effect can then be estimated by combining stratum-specific estimates of treatment effect. Rosenbaum and Rubin (1984, p. 521) show that an adjusted estimate of this type that is based on five strata can remove approximately 90% of the bias in the crude or unadjusted estimate.

You can also see the main reference there

@RobinDenz1
Copy link
Owner

You could easily use standard propensity stratification with the adjustedCurves R-package. Calculate the propensity score for each person, categorize those into groups and use this categorical variable as adjustment covariate in method="surv_strat_amato". But I am not sure how that would be extended to a time-varying covariate.

@maurosc3ner
Copy link

maurosc3ner commented Jul 27, 2022

Hi,

I am in the same situation with covariates that varies through time (age or other categorical signal) for recurrent events (disease readmissions in 5 years time period). is there any update about this?

Thanks

@RobinDenz1
Copy link
Owner

As stated above, extending the adjustedCurves package to allow time-dependent covariates is not a small undertaking. Unfortunately, I had no time to deal with it so far.

Concerning the recurrent events portion of your question: What exactly do you want to estimate? What kind of probability should be displayed? If it's 1 - the causal probability of suffering from the first event (time-to-first-event analysis), you can probably just ignore recurrent events for this analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants