Randomization null distributions for paired designs: within-pair where randomly flip the case-control asignment within each pair; between-pair where the cases and controls remains as cases or controls respectively but the correspondences between cases and controls are randomly asigned. Finally, complete means that we select randomly the half of samples as cases and the rest as controls. The correspondence case-control is randomly asigned too.

null.paired(y, type = c("within-pair", "between-pair", "complete"))

Arguments

y

Design matrix (nrow(y) == ncol(x)). First column y[,1] is the block and second column y[,2] is the element within the block with values 0 (control) and 1 (case)

type

Null randomization distribution: "within-pair" where randomly flip the case-control asignment within each pair; "between-pair" where the cases and controls remains as cases or controls respectively but the correspondences between cases and controls are randomly asigned. Finally, "complete" means that we select randomly the half of samples as cases and the rest as controls. The correspondence case-control is randomly asigned too.

Value

Matrix with the blocks in the first column and the case-control asignment in the second column

See also