Stata code written for the analysis of the GetTested trial. Accompanying data file may be obtained from https://doi.org/10.1371/journal.pmed.1002479.s001