[33], and included 392,372 and 379,906 SNPs in the polygenic scores of MDD and loneliness, respectively. In targeted analyses of CAD, we selected the P threshold at which the polygenic score was most strongly associated with CAD risk (i.e., at an P threshold different than 0.05). This approach improved our power to detect associations with CAD by maximizing the number of pleiotropic SNPs included in the MDD and loneliness polygenic scores. We determined P thresholds of 9.0005 × 10−4 for MDD (n SNPs = 1387) and 2.50005 × 10−3 for loneliness (n SNPs = 2253) by iterating over P from 5 × 10−8 to 1 in increments of 5 × 10-5 and assessing fit via Nagelkerke’s pseudo R2 (Supplementary Fig. 4). Polygenic scores calculated at these best fit P thresholds were used in all sensitivity and replication analyses of CAD to minimize false findings due to overfitting. To adjust for the genetic correlation between MDD and loneliness (Fig. 1b) [10], we used the multitrait-based conditional and joint analysis (mtCOJO) package [34], which uses only meta-GWAS summary statistics to statistically isolate independent genetic associations. Using mtCOJO, we calculated SNP associations with MDD conditional on loneliness (MDD|loneliness), and vice-versa (loneliness|MDD), and calculated