manncz / dRCT

Design-based analysis of RCTs
1 stars 0 forks source link

Some observed user errors #5

Open adamSales opened 11 months ago

adamSales commented 11 months ago

Someone I'm working with just made a couple of errors in using the code and asked me about them, so I figured I would list them here so maybe we could build some safeguards into the software.

(if we had a formula interface, I could imagine specifying like this:

loop(formula=Y~Tr,Z=~x1+x2,data=df)

then include the line

if(length(intersect(all.vars(formula),all.vars(Z)))) stop("Outcome and/or Treatment variables cannot be included as covariates.")

or something of that sort)