-
Notifications
You must be signed in to change notification settings - Fork 18
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
External vector of GPS #42
Comments
Hi @athammad ! You are correct, it is calculated internally, but I believe you should be able to substitute in your estimates of GPS values here: causal-curve/causal_curve/gps_core.py Line 462 in bb9dab9
That is, after you run the ‘fit’ function you can do something like this ‘gps.gps_at_grid = [your array of your own GPS values at the treatment grid points]’ … and then you can calculate the CDRC as usual. Does that make sense? |
HI @ronikobrosly! Thank you for getting back to me. What do you mean by "GPS values at the treatment grid points"? I have a vector with the calculated GPS for every observation in my Dataframe. Are you suggesting that I should recalculate the GPS with a multinomial regression after creating a quantile-based grid across the values of the treatment equivalent to the one I would have to select in Best wishes |
Thinking about this a bit more, I think there is a simpler approach here that will save you time @athammad . If you already have an estimate of the GPS for each observation, then you really dont even need this package: you can estimate the CDRC directly using the treatment values, GPS values, and outcome values. See the methods section of this paper for more details: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5969262/ Specifically the section “ 2.3. Estimation of the dose‐response function using the GPS”. |
Probably easier than adapting the package to fit your GPS, if that makes sense |
Hi guys,
It seems to me that the GPS is calculated internally. What if I have a vector with the GPS (calculated using my own code) and I would like to "plug it" into the model to estimate the DRF?
Thank you very much.
The text was updated successfully, but these errors were encountered: