Learn R Programming

randomizeR

The R package randomizeR is an easy to use tool for the randomization of clinical trials. Its aim is to provide sound scientific evidence for the choice of a randomization procedure, on the basis of well-founded criteria. It includes functions for generating randomization sequences from various randomization procedures as well as various issues for the assessment of the randomization procedures.

Installation

You can install randomizeR from CRAN:

install.packages('randomizeR', dependencies = TRUE)

Motivation

Until now, the choice of a randomization procedure did not follow strict scientific principles. If the choice of a randomization procedure does not account for possible problems during the conduct of a clinical trial, the estimation of the treatment effect can be biased. randomizeR models the possible problems that occur in the analysis of a clinical trial, and provides functions to assess randomization procedures according to the issues.

Usage

library(randomizeR)
?randomizeR
vignette("comparison-example")

cg <- corGuess("CS")
rar <- genSeq(rarPar(6),10)
assess(rar, cg)

License

The package is free and open source software, licensed under GPL 3.

Copy Link

Version

Install

install.packages('randomizeR')

Monthly Downloads

499

Version

3.0.2

License

GPL (>= 3)

Maintainer

Ralf-Dieter Hilgers

Last Published

September 18th, 2023

Functions in randomizeR (3.0.2)

abcdPar

Representing Accelerated Biased Coin Design
abcdRand

Sampling algorithm for abcd
N

Function returning the sample size slot of an S4 object
GSD_allocation

Calculates the Type I error for different randomization sequences from a randomization procedure for a group sequential design
$,desFunc-method

Method defining the $ operator for the desFunc class
TV

Function returning the target value slot of an S4 object
$,desScores-method

Method defining the $ operator for the assessment class
analyse

Creates stratified sequences Compares stratified sequences to their respective non-stratified version under the influence of bias.
bbcdPar

Representing Bayesian Biased Coin Design
GSD_allocation_seq

Calculates the Type I error for a randomization sequence in a group sequential design
$,randPar-method

Method defining the $ operator for the randPar class
bbcdRand

Sampling algorithm for bbcd
$,randSeq-method

Method defining the $ operator for the randSeq class
evaluate

Evaluation of several randomization procedures with respect to certain desirability functions applied to specified issues.
assess

Assessing randomization sequences
combineBias

Combined bias criterion
desirability

Desirability functions within the scope of clinical trials
logRankDecSim

logRankDecSim
compare

Comparison of randomization procedures
chronBias

Representing chronological bias
$,derFunc-method

Method defining the $ operator for the derFunc class
a

Function returning the adjusting parameter a slot of an S4 object
bsdRand

Sampling algorithm for BSD
lambda2

Calculate second non centrality parameter of the doubly non central F-distribution
$,assessment-method

Method defining the $ operator for the assessment class
$,issue-method

Method defining the $ operator for the issue class
$,probUnDesirable-method

Method defining the $ operator for the probUnDesirable class
createSeq

Query to create a randomization sequence of a particular randomization procedure
blocks

Function returning the block slot of an S4 object
derFunc

Representing Derringer-Suich desirability functions
createParam

Representing any randomization procedure
expEndp

Representation of exponentially distributed endpoints
coin

Function returning the coin slot of an S4 object
hadaPar

Representing Hadamard Randomization
issue

Assessment criteria for clinical trials
getDesScores

Applying desirability functions on issues of individual randomization sequences
doublyF_value

Rejection probability for one sequence in the presence of selection bias
doublyF_opt

Distribution function of the non central F-distribution
bsdPar

Representing Big Stick Design
ebcPar

Representing Efron's Biased Coin Design
chenPar

Representing Chen's Design
generateRandomSequences

Generate random sequences
hatMatrix

Calculate hat matrix
$,comparison-method

Method defining the $ operator for the assessment class
doublyT

Approximation of the distribution function of the doubly noncentral t-distribution
getProbabilities

Theoretical probability for randomization sequences
getRandomizationList

Accessor function for the randomization list
getDesign

Design of a randomization procedure
getbiasCS2

Biasing Policy for Avoiding the Placebo Treatment
chenRand

Representing Chen's Design
randSeq-class

An S4 Class for the representation of randomization sequences
imbal

Representing the allocation imbalance
doublyF_values

Rejection probability in case of selection bias in multi-arm trials
saveAssess

Saving an assess object
rarPar

Representing Random Allocation Rule
makeBiasedExpectation

Calculate Expectation vector
gbcdPar

Representing Generalized Biased Coin Design
$,endpoint-method

Method defining the $ operator for the endpoint class
plot

Generic plotting of comparison objects
ratio

Function returning the allocation ratio slot of an S4 object
lambda

Method returning the rate parameter of an expEndp S4 object
doublyTValues

Calculation of the biased type-one-error probability (resp. power) of Student`s t-test
plotDes

desScore plotting
randomizeR-package

Randomization for Clinical Trials
gbcdRand

Sampling algorithm for gbcd
mpPar

Representing Maximal Procedure
hasAllGroups

Check function for occurrence of all treatment groups in the sequence
logRankRejectionProb

Approximation of the biased type I error probability (resp. power) of the log rank test
tbdPar

Representing Truncated Binomal Design
getDistributionPars

Get distribution parameters of a randomization list
mti

Function returning the MTI slot of an S4 object
type

Get type of an object
plotEv

Evaluation plotting
$,evaluation-method

Method defining the $ operator for the evaluation class
makeDesignMatrix

Design Matrix
getExpectation

Get expectations of a randomization list
udPar

Representing Wei's Urn Design
corGuess

Representing the expected number of correct guesses
overview

Overview over the parameters used in the randomizeR package
pbrPar

Representing Permuted Block Randomization
saveRand

Saving a randomization lists
crPar

Representing Complete Randomization
genNcps

Calculation of the NCPs of each randomization sequence for the doubly noncentral t-distribution
genNcps_new

Calculation of the NCPs of each randomization sequence for the doubly noncentral t-distribution
getCorGuesses

Matrix of the guesses of the investigator
shape

Method returning the shape parameter of an survEndp S4 object
plotSeq

Sequence plotting
rho

Function returning the adjusting parameter rho slot of an S4 object
generateAllSequences

Complete set of randomization sequences
getDesFunc

Type of Desirability function
lambda1

Calculate first non centrality parameter of the doubly non central F-distribution
sigma

Function returning the standard deviation slot of a normEndp S4 object
normEndp

Representation of normally distributed endpoints
method

Function returning the method of an S4 object
rpbrPar

Representing Randomized Permuted Block Randomization
probUnDes

Computing the probability of having desirability scores of zero
randBlocks

Function returning the block slot of an S4 object
scale

Method returning the scale parameter of an survEndp S4 object
rtbdPar

Representing Randomized Truncated Binomial Design
selBias

Representing selection bias
mu

Access the expectation value slot of a normEndp S4 object
setPower

Representing the power
get_p_values_new

Calculating p values
getbiasCS1

Biasing Policy for a Group of Favored Treatments
randPar

Settings for randomization procedures
seed

Function returning the allocation seed slot of an object
summary

Summary of assessments of a randomization procedure
survEndp

Representation of survival endpoints
K

Function returning the number of trial arms slot of an S4 object