Yesterday I posted a basic proof-of-concept class for generating a randomisation schedule based on strata. Unfortunately, this code was flawed and was incorrect in its results: because it uses block randomisation within each stratum, the most a single stratum could differ by is the size of the block used minus 1. The following updated code is now completely self-contained, having no dependencies on the original article's code, and uses a generator to produce the schedule.
Friday, October 07, 2011
Thursday, October 06, 2011
Wednesday, October 05, 2011
As part of a project, I'm required to implement various protocols for randomisation of statistical trials. The most basic of these we call "simple": it's the equivalent of flipping a coin every item. This is generally enough for most purposes, although even with a perfectly weighted coin there is still the possibility of a variance between the number of heads and the number of tails. For a clinical trial, for statistical purposes it can be preferred that both heads and tails - in this case, experimental treatments, placebos and/or controls - end up flipping the same number of times, while still requiring each individual result to be completely random.