estimatr
estimatr copied to clipboard
HT warnings / probabilities
Moved from @macartan's https://github.com/DeclareDesign/fabricatr/issues/135
This message seems unecessary given behavior was specified (in dd it is output for every iteration:
A2 <- declare_estimator(Y ~ Z, estimand = Q, clusters = clusters,
model = horvitz_thompson, label = "ht",
simple = FALSE)
`simple` = FALSE, using complete cluster randomization
This message seems harder to avoid:
`condition_prs` not found, estimating probability of treatment to be constant at mean of clusters in `condition2` at prob =0.5
Thoughts:
- If Z_cond_prob is provided as is common in dd can condition_prs not be taken from that (with proper adjustment for those in control)
- Otherwise can users give this in the function for simple cases (e.g. Z_cond_prob = .5) which is simpler than defining the full condition_pr_mat, or perhaps a vector if there are blocks
Voting against hardcoding in Z_cond_prob into horvitz_thompson - this is related to discussion where declare_estimator needs to be able to access the assignment step during executing a design.
I can do one thing for now, which is allow people to pass a single number or a vector of the same length as the data. If it's a single number it'll just get recycled. Sound good?
The discussion about allowing access to the assignment step is a separate question and we can open a new issue on that if there is something that need be done in estimatr.