Similarly, we used genomic structural equation modeling (GenomicSEM16) to model the joint genetic architecture of the four subgroups. First, we ran a common-factor model without individual SNP effects, following the tutorial ‘Models without individual SNP effects’ on the GenomicSEM github website (see web resources). Second, we ran a multivariate GWAS of the common factor (see Supplementary Note 5 for details). We specified the model using unit-variance identification, for which the latent factor variance was fixed to 1 and the loadings of the traits are estimated freely. This ensures that we capture how much of each subgroup contributes to the latent factor. GenomicSEM also generates QSNP-values, which indicate possible heterogeneous effects across the subgroups. The QSNP statistic is mathematically similar to the Q-statistic from standard meta-analysis and is a X2-distributed test statistic with larger values indexing a violation of the null hypothesis that the SNP acts entirely through the common factor.