blockRand: Random Treatment Assignments for Randomized Block Designs

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Randomly draws a specified number of assignment vectors or matrices according to a randomized block design.

Usage

1
blockRand(w, nrand, block)

Arguments

w

a vector or matrix of assignments.

nrand

a number specifying the desired number of random assignments.

block

a vector of block designations.

Details

Assignments are randomly permuted within each block.

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

completeRand, latinRand

Examples

1
2
3
4
5
6
w1 = c(0,1,0,1,0,1,0,1)
block = c(0,0,0,0,1,1,1,1)
blockRand(w1, nrand = 5, block)

w2 = c(0,0,1,1,0,0,1,1)
blockRand(w = cbind(w1,w2), nrand = 5, block)


Search within the randomizationInference package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.