car_ps {RobinCar} | R Documentation |
Generate Pocock-Simon minimization treatment assignments
Description
Generate Pocock-Simon minimization treatment assignments
Usage
car_ps(z, treat, ratio, imb_measure, p_bc = 0.8)
Arguments
z |
The car_strata design matrix |
treat |
A vector of length k (the number of treatment arms), which labels the treatment arms being compared. |
ratio |
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. |
imb_measure |
What measure of imbalance should be minimzed during randomization – either "Range" or "SD" |
p_bc |
The biased probability, i.e., the probability of assigning each patient to the arm that minimizes the imbalance. Default is 0.8 |
Value
- res
treatment assignment vector
A vector of treatment assignments with labels from the ‘treat' argument, based on Pocock-Simon’s minimization.
Author(s)
Ting Ye Yanyao Yi
Examples
# 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"
)
[Package RobinCar version 0.3.0 Index]