-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fit treatment propensity based only on initial time point #40
Comments
Hm, this is a good one. Let me think about it for a second. Definitely possible, just the question of what is the easiest hack for this within existing functionality. |
Thanks, appreciate it. Maybe there is a hack to fit the estimator manually outside of stremr, add the predictions to the data table as a new column with replicated predicted values across all time points, then configure stremr to use that column as the treatment propensity score (manually create or integrate into the fitPropensity object)? |
I guess longer term perhaps there could be a subset_TRT formula for fitPropensity() to identify the subset of observations used for estimation. Or perhaps if I used an sl3 estimator I could manually subset the data within a wrapper, or include a separate data processing step in the pipeline that subsets to t == 0? Would also need to handle the replication of predicted values, possibly in a custom prediction wrapper. |
But do you really want to replicate the actual predicted values across all time-points or rather use the model fit from Can you please confirm that this is exactly what you are trying to accomplish: Fit the model A(0) ~ L(0) and use that model fit to obtain the predictions pi_0 = P(A(0)|L(0)) (\hat added to pi_0 to emphasize these are fits, not true probs). Then multiply all time-varying weights (e.g., censoring) across all time-points t=0,..,K by this additional weight On the other hand you may want to use the above model fit to obtain predictions pi_t = P(A(t)|L(t)) or P(A(0)|L(t)), which would imply that the weights are also time-varying. It seems to me this is not what you are trying to do. |
My interpretation of the article is that for the ITT parameter the treatment propensity score (& associated weights) is time-invariant and based on exposure status at t == 0. So yes that would be what you have in paragraph 2. I could definitely be misinterpreting it though, here are some key excerpts from the article:
What do you think? |
If above is correct, then absolutely the easiest thing to do is evaluate this subject specific weight Here is the code that basically shows how additional weights would be integrated in the weights dataset: Another, much more robust option, is to manually incorporate the additional weight
Hope this helps, let me know when I can close the issue or if you have any questions. |
Thanks a bunch, ok I will give this a try and report back. |
Scratch that. I believe what you originally did would accomplish exactly the same effect as the weight merging procedure that I have described above. It would be nice to confirm it though, but I don't think its necessary. Basically I think what you were doing is fine. You initial propensity score (for t=0) would be evaluated as P(A(0)|L(0)*P(C(0)=1|L(0)). Your propensity scores for t>0 would be evaluated as P(C(t)=1|L(t)). So the cumulative weight at t=1, would be (automatically) evaluated as I believe this corresponds exactly to the intervention that you are after. Intervene on baseline treatment only and intervene on the censoring process across all time-points. Might also double confirm it with @romainkp |
Hello,
I'm trying to conduct an intent-to-treat analysis and am having difficulty fitting the treatment propensity score using only t == 0 (baseline) and then using that estimated baseline treatment propensity across all time points with time-varying censoring.
It looks like when I stratify and only calculate it on t == 0, the treatment propensity score for all remaining time points (1 to 170) may be set to 1 by default? Any recs or hints on how to apply the t = 0 propensity score to all future time points? Censoring on the other hand I do want to be estimated at each time point (or in a pooled manner). Also just fyi at t == 0, 8.7% of the sample is treated.
This is using scrambled data from Romain and attempting to replicate Marcus, J. L., Neugebauer, R. S., Leyden, W. A., Chao, C. R., Xu, L., Quesenberry Jr, C. P., ... & Silverberg, M. J. (2016). Use of abacavir and risk of cardiovascular disease among HIV-infected individuals. JAIDS Journal of Acquired Immune Deficiency Syndromes, 71(4), 413-419.
Here is my rough code:
Thank you and happy to provide any more context if it would be helpful. Sorry if this is an easy fix.
The text was updated successfully, but these errors were encountered: