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

Clarify ordering of block probs in documentation #70

Closed macartan closed 6 years ago

macartan commented 6 years ago

Help is not too clear on order in which to specify block probs. Same for block_prob_each.

Appears to depend on sort order. eg:

> b <- sample(rep(c("a", "d", "_b", 2), 100))
> z <- block_ra(b, block_prob = (1:4)/4)
> table(b, z)
    z
b      0   1
  _b  75  25
  2   50  50
  a   25  75
  d    0 100 
acoppock commented 6 years ago

The help file for block_m_each reads:

The rows should respect the ordering of the blocks as determined by sort(unique(blocks)). The columns should be in the order of conditions, if specified.

I could add something similar to the other arguments that have "rows"?

macartan commented 6 years ago

Yes great; was focused on block_prob but think redundancy here is no harm

On Mon, Jun 18, 2018 at 4:05 PM Alexander Coppock notifications@github.com wrote:

The help file for block_m_each reads:

The rows should respect the ordering of the blocks as determined by sort(unique(blocks)). The columns should be in the order of conditions, if specified.

I could add something similar to the other arguments that have "rows"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DeclareDesign/randomizr/issues/70#issuecomment-398065803, or mute the thread https://github.com/notifications/unsubscribe-auth/AMJO_T1j47UwHN5Nm9F8Uvn9_2U_YHVYks5t97PGgaJpZM4Urx4e .