Kontopantelis, Evangelos. “A Greedy Algorithm for Representative Sampling: Repsample in Stata”. Journal of Statistical Software, Code Snippets 55, no. 1 (November 13, 2013): 1–19. Accessed July 2, 2022. https://www.jstatsoft.org/index.php/jss/article/view/v055c01.