Kontopantelis, E. (2013). A Greedy Algorithm for Representative Sampling: repsample in Stata.
Journal of Statistical Software, Code Snippets
,
55
(1), 1–19. https://doi.org/10.18637/jss.v055.c01