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

specify probs and other args that are length 1 or N for full dataset, not just of length clusters / strata / blocks #77

Closed graemeblair closed 5 years ago

graemeblair commented 6 years ago

When you specify prob and other arguments referring to the prob of sampling clusters / prob within strata or blocks, you are required to provide a vector that is shorter than the dataset. This makes things complex in a tidy framework and, for related reasons, with DeclareDesign. Can it just take the probs / etc. for the full dataset, with repeated values? Then you don't have to worry about ordering the numbers in the same way.

If you want to keep your functionality, it could accept of length 1, n_clusters, and N.

graemeblair commented 6 years ago

Note if of length(N) need to ensure probs are equal within blocks and clusters

acoppock commented 5 years ago

This is addressed in bb99c995291551a3cf9134f8dbccfa4f02f9565b