ARM {CARM} | R Documentation |
Adaptive Randomization via Mahalanobis Distance
Description
Allocates patients to one of two treatments using Adaptive Randomization via Mahalanobis Distance proposed by Yichen Qin,Yang Li, Wei Ma, Haoyu Yang, and Feifang Hu.(2022)
Usage
ARM(covariate, assignment, q = 0.75)
Arguments
covariate |
a data frame. A row of the dataframe corresponds to the covariate profile of a patient. |
assignment |
a vector. If partial patients had been allocated , please input their allocation. IF all the patients are not be allocated, please input 'assignment = NA' directly. |
q |
the biased coin probability.
|
Details
Suppose that patients are to be assigned to two treatment groups.
Consider
continuous covariates for each patient.
is the assignment of the
th patient.
The proposed procedure to assign units to treatment groups, namely adaptive
randomization via Mahalanobis distance (ARM), is outlined below.
(1) Arrange all units randomly into a sequence
.
(2) Assign the first two units with and
.
(3) Suppose that units have been assigned to
treatment groups,
for the
-th and
-th units:
(3a) If the -th unit is assigned to treatment 1 and
the
-th
unit to treatment 2, then calculate the potential
Mahalanobis distance, between the updated treatment groups.
with
units,
.
(3b) Similarly, if the -th unit is
assigned to treatment 2 and
the
-th unit to treatment 1, then calculate the
other potential Mahalanobis distance,
.
(4) Assign the -th unit to treatment groups
according to the
following probabilities:
if ,
;
if ,
;
if ,
.
(5) Repeat the last two steps until all units are assigned. If n is odd, assign the last unit to two treatments with equal probabilities.
Mahalanobis distance between the sample means across
different treatment groups is:
See the reference for more details.
Value
An object of class "ARM" is a list containing the following components:
assignment |
Allocation of patients. |
sample_size |
The number of patients in treatment 1 and treatment 2 respectively. |
Mahalanobis_Distance |
Mahalanobis distance between treatment groups 1 and 2. |
References
Qin, Y., Y. Li, W. Ma, H. Yang, and F. Hu (2022). Adaptive randomization via mahalanobis distance. Statistica Sinica.DOI:<10.5705/ss.202020.0440>.
Examples
library(MASS)
#simulate covariates of patients
p <- 6; n <- 30
sigma <- diag(p); mean <- c(rep(0,p))
data <- mvrnorm(n, mean, sigma)
covariate <- as.data.frame(data)
#IF all the patients are not be allocated
ARM(covariate = covariate, assignment = NA, q=0.75)
#IF you had allocated partial patients
ARM(covariate = covariate,assignment = c(1,2),q=0.75)