For the genome-wide association simulations, we simulated each individual’s phenotype as having a mean determined by his or her geographic position and then simulated Gaussian distributed residual variation to obtain a phenotype with a fixed proportion of variance explained by geographic position. To perform the association test with PC-based correction, we used multiple linear regression with PC1 and PC2 as covariates, as implemented in the program eigenstrat8,12.