DeclareDesign / randomizr

randomizr: Easy-to-Use Tools for Common Forms of Random Assignment and Sampling
https://declaredesign.org/r/randomizr
Other
36 stars 9 forks source link

This pr finishes the *_unit argument additions #81

Closed acoppock closed 5 years ago

acoppock commented 5 years ago

The main trouble was telling the check functions about whether the design was "simple" or not. If the design is simple, then prob_unit can be different for each unit. If the design is complete, blocked, stratified, what have out, then prob_unit has to be constant within block, or cluster or block and cluster.

We've got decent test coverage on these too, I think!

acoppock commented 5 years ago

ps, I accomplished this by adding a simple = TRUE argument to the simple_ra and simple_rs function. It's inelegant, but function arguments are literally the only way the checks learn about the design.

acoppock commented 5 years ago

Thanks Neal!