completeRand {randomizationInference} | R Documentation |
Random Treatment Assignments for Completely Randomized Designs
Description
Randomly draws a specified number of assignment vectors or matrices according to a completely randomized design.
Usage
completeRand(w, nrand)
Arguments
w |
a vector or matrix of assignments. |
nrand |
a number specifying the desired number of random assignments. |
Details
If w
is a matrix, the permutations occur by row.
Value
A list of random assignment vectors or matrices.
Author(s)
Joseph J. Lee and Tirthankar Dasgupta
See Also
Examples
w1 <- c(0, 0, 0, 0, 1, 1, 1, 1)
completeRand(w1, nrand = 5)
w2 <- c(0, 1, 0, 1, 0, 1, 0, 1)
completeRand(w = cbind(w1, w2), nrand = 5)
[Package randomizationInference version 1.0.4 Index]