Learn R Programming

randPack (version 1.18.0)

minimizePocSim: use the Pocock-Simon or Taves algorithm for computing covariate-adaptive 'minimization' allocations for a clinical trial

Description

use the Pocock-Simon or Taves algorithm for computing covariate-adaptive 'minimization' allocations for a clinical trial

Usage

minimizePocSim(df, features, trtvec, obsdf, trttab, f = function(x, y) sum(abs(x + 1 - y)))
minimizeTaves(df, features, trtvec, obsdf, trttab)

Arguments

df
a data frame with columns corresponding to covariates rows corresponding to subjects
features
character vector of covariates to use
trtvec
vector of assignments made so far
obsdf
data frame for incoming observation, with values for all components enumerated in features
trttab
table of treatment ratios
f
score that determines impending allocation

Value

  • a treatment code

Details

These functions are generally not called directly. See the vignette; if supplied as the method slot of a MinimizationDesc object the appropriate data are assembled as arguments to these functions.

Examples

Run this code
new("MinimizationDesc", treatments=c(A=1L, B=1L), method=minimizePocSim,
   type="Minimization", featuresInUse="sex")

Run the code above in your browser using DataLab