Hi! I was just looking for a git repo for blockrand and stumbled across your version...
One thing you might like to add is choose block sizes relative to pascals triangle instead of equal assignment weights to the block sizes... this has the advantage that it's harder to break the blind (due to fewer smaller blocks) and it's likely to result in imbalanced arms at interim or at the end (as there are fewer large blocks to stop in the middle of).
n_blocksizes <- length(block_sizes)
pascal <- choose(n_blocksizes-1, 0:(n_blocksizes-1))
p <- pascal / n_blocksizes
p can then be used with sample to generate the block sizes... :)
Hi! I was just looking for a git repo for blockrand and stumbled across your version...
One thing you might like to add is choose block sizes relative to pascals triangle instead of equal assignment weights to the block sizes... this has the advantage that it's harder to break the blind (due to fewer smaller blocks) and it's likely to result in imbalanced arms at interim or at the end (as there are fewer large blocks to stop in the middle of).
pcan then be used withsampleto generate the block sizes... :)