Learn R Programming

CARM (version 2.0.0)

stratum_ARM: Stratified Adaptive Randomization via Mahalanobis Distance

Description

Update Strata for ARM

Usage

stratum_ARM(
  covariate,
  assignment,
  cont_var = c("C1"),
  cat_var = c("N1", "N2"),
  levels_list = list(C1 = 0:1),
  q = 0.75
)

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.

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.

cont_var

name of continuous covariates

cat_var

name of categorical covariates

levels_list

levels of each categorical covariate

q

the biased coin probability. \(q\) should be larger than 1/2 and less than 1, default = 0.75