---
title: "Algorithm for balancing covariates in RCTs. | Sutter Health"
description: "We conducted simulations with data from a 3-arm randomized trial to compare modified algorithm and R code to another published biased coin minimization method."
url: "https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558"
---

1.  [Home](https://www.sutterhealth.org/) /
2.  [Research](https://www.sutterhealth.org/research) /
3.  [Research publications](https://www.sutterhealth.org/research/publications) /
4.  Algorithm for balancing covariates in RCTs.

# Algorithm for balancing both continuous and categorical covariates in randomized controlled trials

Xiao L, Yank V, & Ma J.

_Comput Methods Programs Biomed. 108(3):1185-90. doi: 10.1016/j.cmpb.2012.06.001. Epub 2012 Jun 22._

2012-12-01

## Abstract

Minimization as proposed by Pocock and Simon for

balancing

categorical

covariates

in clinical trials with individual-level, consecutive randomization has been increasingly used. An extension of the method exists that uses the symmetric Kullback-Leibler divergence index to balance both

categorical

and

continuous

covariates

, albeit for two-arm

randomized controlled trials

only. To date, the

algorithm

has not been made widely available to researchers via publicly accessible software.

We adapted Endo et al.'s

algorithm

to randomized trials with two or more arms. In addition, our

algorithm

incorporates Efron's biased coin method to decrease the predictability of assignment even when a predefined threshold of difference in the numbers of subjects between treatment arms is reached, whereas Endo et al.'s

algorithm

assigns the next subject to the treatment of smaller size with certainty.

We developed code in the free statistical software R to make the

algorithm

readily available to trialists. While there are no definitive answers regarding the optimal choices for certain statistical parameters that must be defined prior to

algorithm

application (P(k), D(n), and p\_D(n)), we provide guidance on these.

We conducted simulations with actual data from a three-arm randomized trial to compare the modified

algorithm

and R code to another published biased coin minimization method that can accommodate

continuous

and

categorical

covariates

in multi-arm trials. The three-arm trial used three

categorical

covariates

(sex, race/ethnicity, and online personal health record access) and four

continuous

covariates

(age, fasting blood glucose, body mass index, and waist circumference). All of the

continuous

and

categorical

covariates

were well balanced, and the results were comparable to the comparison method.

[PubMed abstract](http://www.ncbi.nlm.nih.gov/pubmed/22727633)

## Research topics

-   [Biostatistics](https://www.sutterhealth.org/research-search-results?query=%22%5C%22Biostatistics%5C%22%22)

## Related publications

[View all publications](https://www.sutterhealth.org/research-search-results?verticalKey=research_publication)

-   Publication
    
    ### [A comparison of two worlds: How does Bayes hold up to the status quo for the analysis of clinical trials?](https://www.sutterhealth.org/research/publications/bayesian-vs-trad-methods-to-analyze-clinical-trials-1055312637)
    
    Pressman AR, Avins AL, Hubbard A, Satariano WA.
    
    Contemp Clin Trials. 32(4):561-8. doi: 10.1016/j.cct.2011.03.010. Epub 2011 Mar 29.
    
    2011 Jul 01
    
-   Publication
    
    ### [Comparison of dynamic block randomization and minimization in randomized trials: a simulation study.](https://www.sutterhealth.org/research/publications/block-randomization-minimization-randomized-trials-1055312663)
    
    Xiao L, Lavori PW, Wilson SR, Ma J.
    
    Clin Trials. 8(1):59-69. doi: 10.1177/1740774510391683.
    
    2011 Feb 01
    
-   Publication
    
    ### [Bar charts enhance Bland-Altman plots when value ranges are limited.](https://www.sutterhealth.org/research/publications/bar-charts-enhance-bland-altman-plots-1055312551)
    
    Smith MW, Ma J, Stafford RS.
    
    J Clin Epidemiol. 63(2):180-4. doi: 10.1016/j.jclinepi.2009.06.001. Epub 2009 Aug 27.
    
    2010 Feb 01
    
-   Publication
    
    ### [An easily accessible web-based minimization random allocation system for clinical trials.](https://www.sutterhealth.org/research/publications/web-based-minimization-random-allocation-1055312845)
    
    Xiao L, Huang Q, Yank V, Ma J.
    
    J Med Internet Res. 15(7):e139.
    
    2013 Jul 01
    
-   Publication
    
    ### [Selection bias modeling using observed data augmented with imputed record-level probabilities.](https://www.sutterhealth.org/research/publications/selection-bias-modeling-using-observed-data-1055312921)
    
    Thompson CA, Arah OA.
    
    Ann Epidemiol. pii: S1047-2797(14)00364-0. doi: 10.1016/j.annepidem.2014.07.014. \[Epub ahead of print\]
    
    2014 Aug 12
    

[View all publications](https://www.sutterhealth.org/research-search-results?verticalKey=research_publication)

```json
{"@context":"https://schema.org","@type":"MedicalOrganization","name":"Sutter Health","@id":"https://www.sutterhealth.org/#medicalorganization","url":"https://www.sutterhealth.org","logo":"https://www.sutterhealth.org/static/images/sutter-health-logo.svg","address":{"@type":"PostalAddress","streetAddress":"2200 River Plaza Drive","addressLocality":"Sacramento","addressRegion":"CA","postalCode":"95833","addressCountry":"US"},"areaServed":{"@type":"AdministrativeArea","name":"California"},"sameAs":["https://www.facebook.com/SutterHealth","https://www.instagram.com/sutterhealth/","https://x.com/SutterHealth","https://www.youtube.com/sutterhealth","https://www.linkedin.com/company/sutter-health","https://en.wikipedia.org/wiki/Sutter_Health"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","@id":"https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558#breadcrumblist","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.sutterhealth.org/"},{"@type":"ListItem","position":2,"name":"Research","item":"https://www.sutterhealth.org/research"},{"@type":"ListItem","position":3,"name":"Research publications","item":"https://www.sutterhealth.org/research/publications"},{"@type":"ListItem","position":4,"name":"Algorithm for balancing covariates in RCTs."}]}
```

```json
{"@context":"https://schema.org","@type":"MedicalScholarlyArticle","@id":"https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558#medicalscholarlyarticle","name":"Algorithm for balancing both continuous and categorical covariates in randomized controlled trials","headline":"Algorithm for balancing covariates in RCTs.","abstract":"Minimization as proposed by Pocock and Simon for balancing categorical covariates in clinical trials with individual-level, consecutive randomization has been increasingly used. An extension of the method exists that uses the symmetric Kullback-Leibler divergence index to balance both categorical and continuous covariates , albeit for two-arm randomized controlled trials only. To date, the algorithm has not been made widely available to researchers via publicly accessible software. We adapted Endo et al.'s algorithm to randomized trials with two or more arms. In addition, our algorithm incorporates Efron's biased coin method to decrease the predictability of assignment even when a predefined threshold of difference in the numbers of subjects between treatment arms is reached, whereas Endo et al.'s algorithm assigns the next subject to the treatment of smaller size with certainty. We developed code in the free statistical software R to make the algorithm readily available to trialists. While there are no definitive answers regarding the optimal choices for certain statistical parameters that must be defined prior to algorithm application (P(k), D(n), and p_D(n)), we provide guidance on these. We conducted simulations with actual data from a three-arm randomized trial to compare the modified algorithm and R code to another published biased coin minimization method that can accommodate continuous and categorical covariates in multi-arm trials. The three-arm trial used three categorical covariates (sex, race/ethnicity, and online personal health record access) and four continuous covariates (age, fasting blood glucose, body mass index, and waist circumference). All of the continuous and categorical covariates were well balanced, and the results were comparable to the comparison method.","description":"We conducted simulations with data from a 3-arm randomized trial to compare modified algorithm and R code to another published biased coin minimization method.","keywords":["Biostatistics"],"datePublished":"2012-12-01","url":"https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558","inLanguage":"en-US","identifier":[{"@type":"PropertyValue","propertyID":"PMID","value":"22727633"},{"@type":"PropertyValue","propertyID":"DOI","value":"10.1016/j.cmpb.2012.06.001"}],"sameAs":["https://pubmed.ncbi.nlm.nih.gov/22727633/","https://doi.org/10.1016/j.cmpb.2012.06.001"],"isPartOf":{"@type":"Periodical","name":"Comput Methods Programs Biomed"},"author":[{"@type":"Person","name":"Xiao L"},{"@type":"Person","name":"Yank V"},{"@type":"Person","name":"Ma J"}],"sourceOrganization":{"@type":"MedicalOrganization","name":"Palo Alto Medical Foundation Research Institute"},"about":[{"@type":"DefinedTerm","name":"Biostatistics","url":"https://www.sutterhealth.org/research-search-results?facets=%5B%7B%22i%22%3A%22c_researchTopics.name%22%2C%22v%22%3A%5B%22Biostatistics%22%5D%7D%5D&verticalKey=research_publication"}],"mainEntityOfPage":{"@type":"WebPage","@id":"https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558","breadcrumb":{"@id":"https://www.sutterhealth.org/research/publications/algorithm-balancing-covariates-rcts-1055312558#breadcrumblist"}}}
```
