-
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
using stremr without monitoring #38
Comments
Certainly, everything should work fine without monitoring variable. Just never use any propensity scores for monitoring and don't define the monitoring variable name when loading the data (i.e., leave it as the default) |
I believe I have done as you describe -- can you help identify what is wrong with my minimal working example below? It breaks at the defineIntervedTRT() step.
Edit: Changed a reference to MONITOR and lastNat1 in the stremr call. This is downstream of the defineIntervedTRT call though, so does not alter where the code first breaks. |
Sure, happy to help, would you mind copy pastying the entire log, including all errors? Also, why are you testing the example with categorical censoring, any specific reason for that? |
I want to use a dynamic treatment rule, and the example I found in stremr documentation with DTR has categorical censoring -- you'll notice, however, that I am not using CatC, I am using C for censoring which is binary. Also, I have altered the code in my original post to include libraries and exclude a errant reference to MONITOR (that was downstream of the defineIntervedTRT call, so I do not think affected where the code is breaking).
|
Thanks for reporting,
Indeed this seems like a bug. My suggestion would be to take the code
defineIntervention function and rewrite it to your own dynamic rule needs.
Here is the link to the source code for the function:
https://github.com/osofr/stremr/blob/e6cd51cea0531883cd195ed61f6f72b93b45528b/R/helper_routines.R#L380
Basically the monitoring variable is hardcoded into that function because
we based it on our particular use case. You could easily comment that
dependency out though. In general I would recommend writing your own
functions for dynamic rule definitions (or any counterfactual
intervention), because each rule is so different and no single function can
accommodate them all. Perhaps you could use this function as a starting
point.
Another point is that I would highly advice against using stremr function
for getting all estimators at once. This will never provide you with the
level of flexibility that individual estimator functions can provide, so I
would just call each estimator function separately.
|
Thank you! |
FYI noticed I had an older version of stremr -- the bug does not appear in the newer version. Thanks for your help, Oleg! |
Is it possible to use stremr without a monitoring variable? There does not seem to be a default for MONITOR in defineIntervedTRT(), so do I have to construct a pseudo monitoring variable for the function to work?
Thanks
The text was updated successfully, but these errors were encountered: