Association of Genetic Variants Linked to Late-Onset Alzheimer Disease With Cognitive Test Performance by Midlife

Key Points Question At what age do individuals with higher genetic risk of Alzheimer disease first show cognitive differences from individuals with lower genetic risk, and which of 32 cognitive measures show the earliest difference? Findings In this cross-sectional study of 405 050 individuals, higher genetic risk of Alzheimer disease significantly modified the association of age with 13 of 32 cognitive measures. Best-fitting models suggested that higher genetic risk of Alzheimer disease was associated with changes in cognitive scores of individuals older than 56 years for all 13 measures and older than 47 years for 9 measures. Meaning These findings suggest that by early midlife, subtle differences in cognitive measures may emerge among individuals with higher genetic risk of Alzheimer disease.


eAppendix 4: Functional form and cross-validation details Functional Form
The functional form of the regressions is: Where: • t is the difference between age at assessment and the reference age (40 years).
• Wi are covariates: age at cognitive assessment, self-reported sex, genotyping assay (a binary indicator for whether a UK BiLEVE or UK Biobank Axiom array was used), assessment center (for assessment-center based measures only), practice effect (for online measures only) and 10 genetic ancestry PCs. • "link" is the identity transform for continuous variables, and the logit transform for binary variables • is the "z-scored" or "standardized" value of each participants genetic risk score obtained from: ) Where mean(AD-GRS) and sd(AD-GRS) are the mean and standard deviation AD-GRS scores in the full sample.
Using this functional form, we assume that the mean level of the cognitive measure changes quadratically with age below the threshold, and diverges smoothly (in terms of first derivatives) from this curve as t increases above the threshold.

Cross-validation
For each phenotype we conducted 10-fold cross-validation in which ℎ ℎ was varied in 1-year increments over the range of values supported by the age range in the sample for the phenotype in order to choose the value of ℎ ℎ , the time (relative to the centered reference age) at which the predicted value for individuals with the same covariates, but different AD-GRS, would begin to diverge. The data set was divided randomly into 10 subsets called "folds". For each possible value of ℎ ℎ , one cross-validation was conducted using each fold as the test set, and the rest of the sample as the training set, and we measured the mean-squared prediction error (MSPE) for the fold as the mean squared difference in predicted and observed phenotype values. The total error for the model with ℎ ℎ was then the sum of these 10 fold-specific MSPEs. We chose ℎ ℎ for each phenotype based on which model had the lowest total error, which indicated the best out-of-sample prediction accuracy. For comparability, the same 10 folds were used for each value of ℎ ℎ . Additionally, to check the performance of the cross-validation, we visually examined the total error as a function of ℎ ℎ . We expected smooth U-shaped curves with a single global minimum and no local minima, or monotonic curves indicating that the true minimum lies outside the support of the data. See eFigure 1 for an example.

eAppendix 5: Sensitivity analysis ADGRS with alternative functional forms for age
Using a more flexible functional form (eEquation 4) for the relationship between age and ADGRS led to the same or earlier estimated ages of divergence for all measures (eTable 14) compared to the quadratic functional form (eTable 6) except the indicator of first or second attempt correct for the in-person version of the prospective memory test (see eTable 15). The more rigid functional form (eEquation 3, eTable 13) did not fit the data as well as the quadratic models (eTable 6), and estimated a mix of earlier and later ages of divergence across measures (eTable 15). eEquation 3: Linear age term with quadratic divergence term ~ ( 0 + ( 1 ) + 2 × ( > ℎ ℎ ) × ( − ℎ ℎ ) 2 + ∑ ) (eEquation 3) eEquation 4: Cubic age term with 4 th -order divergence term ~ ( 0 + ( 1 + 2 2 + 3 3 ) + 4 × ( > ℎ ℎ ) × ( − ℎ ℎ ) 4 + ∑ ) (eEquation 4) eAppendix 6: Sensitivity analysis using count of APOE ε4 alleles In sensitivity analyses using the count of APOE ε4 alleles instead of the AD-GRS, there was evidence that the count of APOE ε4 alleles modified the association of age with 11 measures derived from the pairs matching, symbol digit substitution, numeric memory and trail-making tests (eTable 7), with west-fitting models indicated divergence by age 60 for these measures (eTable 8).
For sensitivity analyses presented in eTables 9 and 10 we used the following functional form: Where cognitive score (Y) is a function of age, count of APOE ε4 alleles (APOE), their interaction, and covariates Wi.
eAppendix 7: Sensitivity analysis using count of APOE ε4-alleles and an AD-GRS that excludes APOE In sensitivity analyses using both the count of APOE ε4 alleles and the AD-GRS omitting SNPs in the APOE region, there was evidence that the count of APOE ε4 alleles modified the association of age with 2 measures derived from the pairs matching, symbol digit substitution, numeric memory and trail-making tests (eTable 9), but no interactions between age and the AD-GRS were significant. Best-fitting models indicated higher ages of divergence, with 9 measures suggesting divergence by age 63, while 3 measures suggested no divergence at the highest observed age (eTable 10). For sensitivity analyses presented in eTables 9 and 10 we used the following functional form: Where cognitive score (Y) is a function of age, z-scored AD-GRS (ADGRSz), count of APOE ε4 alleles (APOE), the interaction of age with AD-GRS, the interaction of age with count of APOE ε4 alleles, and covariates Wi .
Using a more flexible functional form for the relationship between age and AD-GRS led to the same or earlier estimated ages of divergence for all measures except the indicator of first or second attempt correct for the in-person version of the prospective memory test. The more rigid functional form did not fit the data as well as the main divergence models, and estimated a mix of earlier and later ages of divergence across measures (eTables 6, 13, 14 and 15).

eAppendix 8 Sensitivity analysis excluding APOE from the AD-GRS
In sensitivity analyses using an AD-GRS that excluded alleles from the APOE region, the AD-GRS did not significantly modify the association of age with any cognitive measures at the Bonferroni threshold, but the interaction was significant at p<0.05 for 3 cognitive measures (eTable 11). Best-fitting models indicated earliest age of divergence before 50 years for 4 cognitive assessments (eTable 12). Average CV error is plotted on vertical axis, and the age of divergence for the model (t threshold ) is on the horizontal axis. The figure shows that the model with divergence in cognitive test score between low and high AD-GRS at age 59 was the best CV fit to the data based on the location of the minimum error.