Closed pzivich closed 5 years ago
Still needs to be cleaned up, but I think the scipy.optimize
part is so cool. Less efficient than the closed form but I am really happy with the code generally
However, I am having trouble with more than one psi for this procedure
Implementing g-estimation of structural nested mean models for single time-point studies. #27 G-estimation is the last of Robins's g-methods I have to implement. After this, I can finally claim that all of the g-methods are within zEpid in at least some form.
G-estimation estimates a slightly different parameter than the g-formula and IPTW. It is better at finding effect measure modification. As stated in #27, I only plan on implementing additive SNM. It makes the estimation process easier for me to code and there are some major issues/weaknesses with the ratio scale SNM
TODO:
[x] Implement closed form solver
[x] Implement grid search solver
[x] Write corresponding tests for g-estimation
[x] Compare to R functions / HR for multiple psi estimation procedures (test with 3+ terms compared to R)
[x] Clean-up documentation inside function
[x] Write example using g-estimation
[x] Update ReadTheDocs to include g-estimation pages