benbhansen-stats / propertee

Prognostic Regression Offsets with Propagation of ERrors, for Treatment Effect Estimation (IES R305D210029).
https://benbhansen-stats.github.io/propertee/
Other
2 stars 0 forks source link

BUG fix `.order_samples()` when NA's are present in ordering variable #151

Closed jwasserman2 closed 9 months ago

jwasserman2 commented 9 months ago

The way I ordered the output of estfun.DirectAdjusted() was liable to change upon different calls when no by argument was provided to cov_adj() and the fallback ordering variables--the unit of assignment variables in the Design object--contained NA's. This resulted in vcovDA() spitting out different estimates from call to call. I fixed this bug, which necessitated changing the order of the estimating equations matrix (not consequential in and of itself). The ordering is provided in the documentation. I beefed up testing, and made sure this new procedure works when the cluster argument is invoked in vcovDA().