acoppock / ri2

Randomization Inference for Randomized Experiments
Other
12 stars 4 forks source link

conduct_ri_ATE silently drops transformation of outcome variable #20

Open deaneckles opened 5 years ago

deaneckles commented 5 years ago

Given the way this extracts the outcome variable, transformations are silently dropped. https://github.com/acoppock/ri2/blob/master/R/conduct_ri_ATE.R#L22-L28

For example, if the formula is log(y+1) ~ x then the untransformed y is used as the outcome.

Seems like this should at least warn the user, if not actually apply the transformation.

acoppock commented 3 years ago

@deaneckles that's interesting. clearly a way around this would be to transform in the data. I think fixing this within ri2 would require learning aobut the outcome variable differently. thanks for the pointer.

deaneckles commented 3 years ago

Yeah, maybe hard to generally fix, but perhaps good to fail with error.