Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in treatment assignment from 0.12 to 0.16 #73

Closed
lukesonnet opened this issue Jun 29, 2018 · 1 comment
Closed

Changes in treatment assignment from 0.12 to 0.16 #73

lukesonnet opened this issue Jun 29, 2018 · 1 comment

Comments

@lukesonnet
Copy link
Contributor

lukesonnet commented Jun 29, 2018

See the following MWE:

install.packages("randomizr") # currently on version 0.16

library(randomizr)
prs <- rep(1/7, times = 7)
bls <- paste0(rep(letters[1:6], each = 100), rep(1:3, times = c(40, 10, 50)))
set.seed(42)
t1 <- block_ra(blocks = bls, prob_each = prs)

devtools::install_version("randomizr", "0.12.0")

library(randomizr)
set.seed(42)
t2 <- block_ra(blocks = bls, prob_each = prs)
table(t1==t2)

The result is that there are a few cases where the randomization is not equivalent. Indeed I believe this is due to a change in load balancing (Issue #35). This isn't ideal for those of us who use randomizr in old randomizations and rely on rerunning those scripts to ensure the randomization protocol doesn't change as data upstream from the randomization changes. Also, would like to know (for a friend) if the old version was "wrong" because then I've got a bigger problem.

@acoppock
Copy link
Collaborator

acoppock commented Jul 2, 2018

I believe that the new version is "better" but that the old version was not "wrong". I think you're seeing differences because of #50.

So yes, the randomization distribution under 12 admits slightly more possibilities than under 16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants