sampleAssign {ResearchMethods} | R Documentation |
Using a Graphical User Interface (GUI), this function demonstrates to the user different ways to allocate patients to different treatments. The methods are taken from Pocock's book referenced below.
sampleAssign(gui = T, n = 30, treat = 3, coinProb, type = 0, ...)
gui |
An indicator of whether the interface should be activated |
n |
Number of patient to allocate |
treat |
Number of treatments to allocate patients to |
coinProb |
The probability for the biased coin |
type |
The type of allocation to use: 0=simple allocation, 1=random permuted blocks, 2=Biased Coin |
... |
Additional arguements... |
This function produces two windows. The first window is the control window, from which the user can select one of the following three allocation methods: textsl{Simple Randomization, Random Permuted Blocks, Biased Coin}. For each of the methods, the number of patients being allocated, n
can be set, and for the first two, the number of treatments can also be set. Note that Biased Coin can only take two treatments.
The second window is the plotting window, which displays what treatment each patient is allocated to. The first patient is in the top-right corner, and the patients read across as normal. The color coding for the first two methods is self explanatory. For the Biased Coin method, treatment A is colored as red and B as blue. The light red and light blue indicate that the patient is allocated to the same treatment, but they are allocated there because of the biased coin, ie, the light red patients would be blue if a simple randomization scheme were used.
No value is returned, though the environment, SAenv, is left for the user to examine.
Mohamed Abdolell <mohamed.abdolell@dal.ca> and Sam Stewart <samstewart11@gmail.com>