Source: https://www.stata.com/manuals14/rproportion.pdf