rr: Restricted randomization

Description Usage Arguments Value Author(s) Examples

View source: R/restricted.R

Description

Simulates a clinical trial one time with retricted randomizaion procedure

Usage

1
rr(nsbj, w, proc, proc_param, distr, distr_param)

Arguments

nsbj

number of subjects to randomize.

w

vector of fixed allocation ratio (integers with GCD = 1).

proc

name of randomization procedure c("CRD", "PBD", "BUD", "MWUD", "DBCD", "DL", "MinQD", "MaxEnt").

proc_param

tuning parameter of randomization procedure (NA for "CRD").

distr

distribution of response c("binary", "uniform", "normal", "exponential", "weibull", "loglogistic", "lognormal"). See response for details.

distr_param

parameter(s) of the response distribution (a list with numeric vector(s) with the same length as w). See response.

Value

a list with three items:

Author(s)

Yevgen Ryeznik ([email protected]), Oleksandr Sverdlov

Examples

1
2
3
   rr(200, c(4, 3, 2, 1), "DL", 2, "normal", list(mean = rep(0, 4), sd = rep(1, 4)))
   rr(200, c(31, 13), "MaxEnt", 0.5, "normal", list(mean = c(0, 0.2), sd = c(1, 1))) 
      

yevgenryeznik/artool documentation built on Dec. 13, 2017, 1:39 a.m.