Closed pzivich closed 5 years ago
I have an alternative that does not require this change. The weights
argument won't change. Weights are still specified in the init, used to fit models, and generate the final values. The change is how missing data is handled by the classes.
Rather than dropping all missing data, missing outcome data is retained. All other types of missing data are dropped. IPTW
and AIPTW
gain the missing_model()
function, like TMLE
, which removes the need for the above syntax change.
The problem was the missing outcome weights would be used to estimate the ATE but shouldn't be used to fit the model. The new structure avoids this issue but also doesn't require the more confusing weight statements
I should allow for greater specification of how weights are used. Currently weights are used to calculate both the nuisance models and the final estimate.
However, there are some combinations that aren't currently supported. For example IPMW for the outcome should only be used to get the final estimate, not necessarily fit the nuisance model. I think the solution is to keep the
weight
option in the_init_
. That weight would be used to get the final weighted estimated but not fit the model. Anotherweight
option would occur in themodel()
functions, where that weight would be used to fit the model. This will allow for greater user control and only minor bloating of parametersInformation regarding these weights should be added to the
summary()
function, so it is clear what weights are used where