Source: https://www.princeton.edu/~otorres/StataTutorial.pdf