car_ps.Rd
Generate Pocock-Simon minimization treatment assignments
car_ps(z, treat, ratio, imb_measure, p_bc = 0.8)
The car_strata design matrix
A vector of length k (the number of treatment arms), which labels the treatment arms being compared.
A vector of length k (the number of treatment arms), which indicates the allocation ratio, e.g., c(1,1,1) for equal allocation with three treatment arms.
What measure of imbalance should be minimzed during randomization -- either "Range" or "SD"
The biased probability, i.e., the probability of assigning each patient to the arm that minimizes the imbalance. Default is 0.8
treatment assignment vector
A vector of treatment assignments with labels from the `treat` argument, based on Pocock-Simon's minimization.
# Create car_strata variables
library(fastDummies)
library(dplyr)
x <- runif(100)
z <- cut(x, breaks=c(0, 0.25, 0.5, 0.75, 1.0))
z <- dummy_cols(z)
A <- car_ps(
z=z[, 2:5],
treat=c(0, 1, 2),
ratio=c(1, 1, 1),
imb_measure="Range"
)