Closed jaspercooper closed 5 years ago
You should be able to use generics
and not broom
with estimatr
, fwiw
Thanks, @nfultz I just tried it because I'm getting a weird error on travis, where DD doesn't seem to be finding the right model method for lm_lin objects. Weird though, because it runs fine locally:
Error in validation_fn(handler)(ret, dots, label) : You provided a lm_lin model, which DeclareDesign does not directly support. It's possible that the broom package can help. Please install the broom package with install.packages('broom') and try declaring your estimator again. If that fix does not work, you may need to write a custom estimator.
@acoppock suggests checking the generics version so I'll try that. Happy for any advice.
lm_lin
doesn't have a tidy method defined in estimatr: https://github.com/DeclareDesign/estimatr/blob/master/R/S3_tidy.R
We could add one I guess.
Not sure I understand how the diagnosis and designer can work fine locally without a tidy method, and then break on Travis, though. Do you have a sense of what is generating this @nfultz ?
validation_fn()
is set to error for lm_lin, even though tidy() works on lm_lin class with the current estimatr version. Should still create S3 method for lm_lin?
PR on DeclareDesign: https://github.com/DeclareDesign/DeclareDesign/compare/remove-error-message-for-lm_lin?expand=1
Totals | |
---|---|
Change from base Build 1258: | 0.0% |
Covered Lines: | 862 |
Relevant Lines: | 862 |
Description
Builds a design with one treatment and one control arm. Treatment effects can be specified either by providing \code{control_mean} and \code{treatment_mean} or by specifying a \code{control_mean} and \code{ate}. Non random assignment is specified by a possible correlation, \code{rho_WZ}, between \code{W} and a latent variable that determines the probability of \code{Z}.
Nonignorability is specified by a possible correlation, \code{rho_WY}, between \code{W} and outcome \code{Y}.
Checklist: