randomizeR (version 1.4.2)

generateRandomSequences: Generate random sequences

Description

Generates randomization sequences from a given randomization procedure.

Usage

genSeq(obj, r, seed)

# S4 method for abcdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for abcdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for abcdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for abcdPar,missing,missing genSeq(obj, r, seed)

# S4 method for bbcdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for bbcdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for bbcdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for bbcdPar,missing,missing genSeq(obj, r, seed)

# S4 method for ebcPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for ebcPar,missing,numeric genSeq(obj, r, seed)

# S4 method for ebcPar,numeric,missing genSeq(obj, r, seed)

# S4 method for ebcPar,missing,missing genSeq(obj, r, seed)

# S4 method for bsdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for bsdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for bsdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for bsdPar,missing,missing genSeq(obj, r, seed)

# S4 method for chenPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for chenPar,numeric,missing genSeq(obj, r, seed)

# S4 method for chenPar,missing,numeric genSeq(obj, r, seed)

# S4 method for chenPar,missing,missing genSeq(obj, r, seed)

# S4 method for crPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for crPar,missing,numeric genSeq(obj, r, seed)

# S4 method for crPar,numeric,missing genSeq(obj, r, seed)

# S4 method for crPar,missing,missing genSeq(obj, r, seed)

# S4 method for gbcdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for gbcdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for gbcdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for gbcdPar,missing,missing genSeq(obj, r, seed)

# S4 method for hadaPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for hadaPar,missing,numeric genSeq(obj, r, seed)

# S4 method for hadaPar,numeric,missing genSeq(obj, r, seed)

# S4 method for hadaPar,missing,missing genSeq(obj, r, seed)

# S4 method for mpPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for mpPar,missing,numeric genSeq(obj, r, seed)

# S4 method for mpPar,numeric,missing genSeq(obj, r, seed)

# S4 method for mpPar,missing,missing genSeq(obj, r, seed)

# S4 method for pbrPar,missing,numeric genSeq(obj, r, seed)

# S4 method for pbrPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for pbrPar,missing,missing genSeq(obj, r, seed)

# S4 method for pbrPar,numeric,missing genSeq(obj, r, seed)

# S4 method for rarPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for rarPar,missing,numeric genSeq(obj, r, seed)

# S4 method for rarPar,numeric,missing genSeq(obj, r, seed)

# S4 method for rarPar,missing,missing genSeq(obj, r, seed)

# S4 method for rpbrPar,missing,numeric genSeq(obj, r, seed)

# S4 method for rpbrPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for rpbrPar,missing,missing genSeq(obj, r, seed)

# S4 method for rpbrPar,numeric,missing genSeq(obj, r, seed)

# S4 method for tbdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for tbdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for tbdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for tbdPar,missing,missing genSeq(obj, r, seed)

# S4 method for rtbdPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for rtbdPar,missing,numeric genSeq(obj, r, seed)

# S4 method for rtbdPar,numeric,missing genSeq(obj, r, seed)

# S4 method for rtbdPar,missing,missing genSeq(obj, r, seed)

# S4 method for udPar,numeric,numeric genSeq(obj, r, seed)

# S4 method for udPar,missing,numeric genSeq(obj, r, seed)

# S4 method for udPar,numeric,missing genSeq(obj, r, seed)

# S4 method for udPar,missing,missing genSeq(obj, r, seed)

Arguments

obj

object specifying the randomization procedure, see randPar or createParam.

r

numeric indicating the number of random sequences to be generated at random, or missing.

seed

a single value, interpreted as an integer, that specifies the seed for the random number generation.

Value

An object inheriting from '>randSeq, representing the r randomisation sequences generated at random for the specified randomization procedure. The output consists of the parameters used for the generation of the randomization sequences (see createParam) and the matrix M that stores the randomization sequences in its r rows. If r is missing, one sequence is generated by default.

Details

genSeq generates randomization sequences for a randomization procedure as defined by the input paramters. genSeq has two modes, according to the input.

  1. genSeq(obj,r): gives r random sequences from the design specified by obj, along with the parameters stored in obj.

  2. genSeq(obj): gives one random sequences from the design specified by obj, along with the parameters stored in obj.

The sequences are generated by using the Monte-Carlo sampling technique to sample from the true distribution of the sequences according to the randomization procedure specified by obj. The parameters of the randomization procedure are saved along with the sequences to ensure reproducibility of the results.

Examples

Run this code
# NOT RUN {
# CR
myPar <- crPar(10)
genSeq(myPar, 4)
genSeq(myPar)

# EBC
myPar <- ebcPar(10, 0.667)
genSeq(myPar, 4)
genSeq(myPar)

# BSD
myPar <- bsdPar(10, 2)
genSeq(myPar, 4)
genSeq(myPar)

# PBR
myPar <- pbrPar(c(4, 4))
genSeq(myPar, 4)
genSeq(myPar)

# RAR
myPar <- rarPar(10)
genSeq(myPar, 4)
genSeq(myPar)

# MP 
myPar <- mpPar(10, 2)
genSeq(myPar, 4)
genSeq(myPar)

# HAD
myPar <- hadaPar(10)
genSeq(myPar, 4)
genSeq(myPar)

# UD
myPar <- udPar(8, 0, 1)
genSeq(myPar,4)
genSeq(myPar)

# TBD
myPar <- tbdPar(c(4, 6))
genSeq(myPar, 4)
genSeq(myPar)

# GBCD
myPar <- gbcdPar(8, 2)
genSeq(myPar, 4)
genSeq(myPar)

# ABCD
myPar <- abcdPar(8, 3)
genSeq(myPar, 4)
genSeq(myPar)

# BBCD
myPar <- bbcdPar(8, 5)
genSeq(myPar, 5)
genSeq(myPar)

# CHEN
myPar <- chenPar(8, 2, 0.667)
genSeq(myPar, 5)
genSeq(myPar)

# }

Run the code above in your browser using DataLab