Associations of dementia polyexposure scores to Alzheimer's disease endophenotypes in a diverse population.
The 13 matches
- [1] § METHODS › Clinical risk scores › Cognitive Health and Dementia Risk Reduction ↔ workflow/scripts/imputation.qmd, lines 55–114 · score 0.78 · atrial fibrillation, cognitive engagement, social support, insomnia, SD, obesity
- [2] § METHODS › Clinical risk scores › Cognitive Health and Dementia Risk Reduction ↔ workflow/scripts/crs_analysis.qmd, lines 77–136 · score 0.77 · atrial fibrillation, cognitive engagement, social support, insomnia, obesity, stroke
- [3] § METHODS › Statistical analysis › AD Endophenotypes ↔ workflow/scripts/crs_analysis.qmd, lines 1797–1943 · score 0.69 · cognitive function, plasma biomarkers, CogDrisk, ratio, hippocampal, executive
- [4] § RESULTS › Higher clinical risk burden was associated with worsening AD endophenotypes › CogDRisk ↔ workflow/scripts/crs_analysis.qmd, lines 1758–1795 · score 0.68 · cortical thickness, hippocampal volume, verbal ability, executive function, CogDRisk
- [5] § METHODS › Health and Aging Brain Study–Health Disparities › Endophenotype standardization ↔ workflow/scripts/crs_standardization.qmd, lines 199–252 · score 0.66 · composite scores, delayed, WMS, Animal, Digit, FAS
- [6] § RESULTS › Higher clinical risk burden was associated with worsening AD endophenotypes › mCAIDE ↔ workflow/scripts/crs_analysis.qmd, lines 1758–1795 · score 0.58 · cortical thickness, hippocampal volumes, verbal ability, mCAIDE, race
- [7] § METHODS › Health and Aging Brain Study–Health Disparities › Endophenotype standardization ↔ workflow/scripts/crs_standardization.qmd, lines 254–371 · score 0.57 · log transformed, raw, outliers, HABS, Plasma, NfL
- [8] § METHODS › Statistical analysis › Prediction of pTau217/Aβ42 amyloid positivity by CRS ↔ workflow/scripts/cutoff_analysis.qmd, lines 25–44 · score 0.57 · optimal cutpoint, Youden, bootstrapping, pTau217, threshold
- [9] § METHODS › Clinical risk scores › Lifestyle for Brain Health ↔ workflow/scripts/crs_analysis.qmd, lines 186–256 · score 0.56 · heart diseases, AUDIT, alcohol, renal, physical, RAPA
- [10] § METHODS › Clinical risk scores › Lifestyle for Brain Health ↔ workflow/scripts/imputation.qmd, lines 164–233 · score 0.56 · heart diseases, AUDIT, alcohol, renal, physical, RAPA
- [11] § METHODS › Statistical analysis › Cognitive impairment ↔ workflow/scripts/crs_analysis.qmd, lines 2227–2312 · score 0.54 · Logistic regression, CogDRisk, squared, Nagelkerke, mCAIDE, MCI
- [12] § METHODS › Health and Aging Brain Study–Health Disparities › Endophenotype standardization ↔ workflow/scripts/crs_standardization.qmd, lines 376–438 · score 0.54 · Cortical thickness, entorhinal, fusiform, inferior, Hippocampal, AD
- [13] § RESULTS › Higher clinical risk burden was associated with worsening AD endophenotypes › Lifestyle for Brain Health ↔ workflow/scripts/crs_analysis.qmd, lines 1797–1943 · score 0.53 · plasma biomarkers, hyperintensity, population, hippocampal, executive, neuroimaging
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Quarto · 2,407 lines · 113 KB · MIT · 7 matches
- ---
- title: "CRS analysis"
- author: "Meri Okorie"
- date: "2025-12-10"
- output: html_document
- ---
- ### Setup
- ```{r}
- library(ggplot2)
- library(dplyr)
- library(tidyr)
- library(pROC)
- library(PRROC)
- library(readr)
- library(Metrics)
- library(r2redux)
- library(ggalluvial)
- library(glue)
- library(broom)
- library(purrr)
- library(tidyverse)
- library(scales)
- library(rcompanion)
- library(plotgardener)
- library(cowplot)
- library(parameters)
- library(mice)
- library(missForest)
- library(rcompanion)
- library(forcats)
- ```
- ### Imputation
- ```{r}
- #former smoker
- data_org$smoke_former = ifelse(data_org$substance_use_smoke_end_age < data_org$age, 1, 0)
- data_org$smoke_former[is.na(data_org$smoke_former)] = 0
- new_data_cols = c("age", "sex", "id_education", "id_income", "id_language_primary", "bmi", "imh_diabetes", "imh_stroke", "imh_tbi",
- "cdx_hypertension", "cdx_depression", "rapa_1_1", "rapa_1_2", "rapa_1_6", "rapa_1_7", "smoke_ever", "smoke_former", "smoke_currently",
- "social_support_total", "audit_1", "eGFR", "imh_high_cholesterol", "bw_hdl_chol", "bw_chol_total", "om_bp1_sys", "om_bp2_sys",
- "rapa_1_total", "rapa_2_total", "race", "cdr", "hc_insurance_no_insurance", "health_status", "prs_z_prscsx", "PC1", "PC2", "PC3", "PC4")
- vars = c("bmi", "imh_diabetes", "imh_tbi", "rapa_1_1", "rapa_1_2", "rapa_1_6", "rapa_1_total", "rapa_2_total",
- "rapa_1_7", "smoke_ever", "smoke_currently", "social_support_total", "audit_1",
- "eGFR", "bw_hdl_chol", "om_bp1_sys", "om_bp2_sys", "bw_chol_total")
- data_for_imp_fixed = data_org %>%
- select(all_of(new_data_cols)) %>%
- mutate(across(where(is.character), as.factor)) %>%
- mutate(across(where(~ is.numeric(.) && n_distinct(., na.rm = TRUE) == 2), ~ as.factor(.))) %>%
- as.data.frame()
- set.seed(123)
- imp_mf = missForest(data_for_imp_fixed, maxiter = 10, ntree = 100)
- data_imp = imp_mf$ximp
- data_imp_values = imp_mf$ximp
- data_imputed = data_org
- data_imputed[vars] = data_imp_values[vars]
- plot(density(data_org$rapa_2_total, na.rm = T), xlab = "BMI", lwd = 2, col = "black")
- lines(density(data_imputed$rapa_2_total), col = "red", lty = 3, lwd = 2)
- # CogD
- threshold_ss = quantile(data_imputed$social_support_total, 0.15, na.rm = TRUE)
- habs_imp = data_imputed %>%
- mutate(
- bw_chol_total_mmoll = bw_chol_total / 38.67
- )
- data.cogd_imp = habs_imp %>% # insomnia, fish consumption, atrial fibrillation, and cognitive engagement not measured
- mutate(
- cogd_age = case_when(
- sex == 0 & age < 60 ~ 0,
- sex == 0 & age >= 60 & age <= 64 ~ 0,
- sex == 0 & age >= 65 & age <= 69 ~ 5,
- sex == 0 & age >= 70 & age <= 74 ~ 8,
- sex == 0 & age >= 75 & age <= 79 ~ 12,
- sex == 0 & age >= 80 & age <= 84 ~ 17,
- sex == 0 & age >= 85 & age <= 89 ~ 20,
- sex == 0 & age >= 90 ~ 22,
- sex == 1 & age < 60 ~ 0,
- sex == 1 & age >= 60 & age <= 64 ~ 0,
- sex == 1 & age >= 65 & age <= 69 ~ 5,
- sex == 1 & age >= 70 & age <= 74 ~ 7,
- sex == 1 & age >= 75 & age <= 79 ~ 13,
- sex == 1 & age >= 80 & age <= 84 ~ 16,
- sex == 1 & age >= 85 & age <= 89 ~ 19,
- sex == 1 & age >= 90 ~ 23,
- TRUE ~ NA_real_
- ),
- cogd_edu = case_when(
- id_education > 11 ~ 0,
- id_education >= 8 & id_education <= 11 ~ 2,
- id_education < 8 ~ 4,
- TRUE ~ NA_real_
- ),
- cogd_obesity = case_when( # only assigned for patients under the age of 65
- bmi >= 18.5 & bmi <= 25 ~ 0, # normal
- bmi > 25 & bmi <= 30 ~ 1, # overweight
- bmi < 18.5 ~ 3, # underweight
- bmi > 30 ~ 2, # obese
- TRUE ~ NA_real_
- ),
- cogd_chol = case_when(
- bw_chol_total_mmoll < 6.5 ~ 0,
- bw_chol_total_mmoll >= 6.5 ~ 3,
- TRUE ~ NA_real_
- ),
- cogd_diabetes = case_when(
- imh_diabetes == 0 ~ 0,
- sex == 0 & imh_diabetes == 1 ~ 2,
- sex == 1 & imh_diabetes == 1 ~ 3,
- TRUE ~ NA_real_
- ),
- cogd_stroke = case_when(
- imh_stroke == 0 ~ 0,
- imh_stroke == 1 ~ 2,
- TRUE ~ NA_real_
- ),
- cogd_tbi = case_when(
- imh_tbi == 0 ~ 0,
- imh_tbi == 1 ~ 1,
- TRUE ~ NA_real_
- ),
- cogd_hypertension = case_when(
- cdx_hypertension == 0 ~ 0,
- cdx_hypertension == 1 ~ 1,
- TRUE ~ NA_real_
- ),
- cogd_depression = case_when(
- cdx_depression == 0 ~ 0,
- cdx_depression == 1 ~ 4,
- TRUE ~ NA_real_
- ),
- cogd_physical = case_when(
- rapa_1_6 == 1 | rapa_1_7 == 1 ~ -3,
- is.na(rapa_1_6) & is.na(rapa_1_7) ~ NA_real_,
- TRUE ~ 0
- ),
- cogd_smoke = case_when(
- smoke_ever == 0 ~ 0,
- smoke_former == 0 ~ 0,
- smoke_former == 1 ~ 0.2,
- smoke_currently == 0 ~ 0,
- smoke_currently == 1 ~ 2,
- TRUE ~ NA_real_
- ),
- cogd_social = case_when(
- social_support_total >= threshold_ss ~ 2,
- social_support_total < threshold_ss ~ 0,
- TRUE ~ NA_real_
- )
- ) %>%
- rowwise() %>%
- mutate(
- # Compute cogd score (else condition) and set it to NA if any variable is NA (if condition)
- cogd = if(any(is.na(c(cogd_age, cogd_edu, cogd_obesity, cogd_chol, cogd_diabetes, cogd_stroke, cogd_tbi,
- cogd_hypertension, cogd_depression, cogd_physical, cogd_smoke, cogd_social)))) {
- NA_real_
- } else {
- sum(c(cogd_age, cogd_edu, cogd_obesity, cogd_chol, cogd_diabetes, cogd_stroke, cogd_tbi,
- cogd_hypertension, cogd_depression, cogd_physical, cogd_smoke, cogd_social), na.rm = TRUE)
- }
- ) %>%
- ungroup()
- # mutate(cogd_noedu = ifelse(!is.na(cogd) & !is.na(cogd_edu), cogd - cogd_edu, NA_real_))
- # Libra
- data.libra_imp = data.cogd_imp %>%
- mutate(
- libra_obesity = case_when( # only assigned for patients under the age of 65
- bmi < 18.5 ~ 0,
- bmi >= 18.5 & bmi < 25 ~ 0, # normal
- bmi >= 25 & bmi < 30 ~ 1.6, # overweight
- bmi >= 30 ~ 1.6, # obese
- TRUE ~ NA_real_
- ),
- libra_chol = case_when(
- bw_chol_total_mmoll < 6.5 ~ 0,
- bw_chol_total_mmoll >= 6.5 ~ 1.4,
- TRUE ~ NA_real_
- ),
- libra_diabetes = case_when(
- imh_diabetes == 0 ~ 0,
- imh_diabetes == 1 ~ 1.3,
- TRUE ~ NA_real_
- ),
- libra_hypertension = case_when(
- cdx_hypertension == 0 ~ 0,
- cdx_hypertension == 1 ~ 1.6,
- TRUE ~ NA_real_
- ),
- libra_depression = case_when(
- cdx_depression == 0 ~ 0,
- cdx_depression == 1 ~ 2.1,
- TRUE ~ NA_real_
- ),
- libra_physical = case_when( # 0.27% missigness
- rapa_1_1 == 1 | rapa_1_2 == 1 ~ 1.1,
- is.na(rapa_1_1) & is.na(rapa_1_2) ~ NA_real_,
- TRUE ~ 0
- ),
- libra_smoke = case_when(
- smoke_currently == 1 ~ 1.5,
- smoke_currently == 0 ~ 0,
- TRUE ~ NA_real_
- ),
- libra_alcohol = case_when(
- audit_1 == 3 ~ -1.0,
- !is.na(audit_1) ~ 0, # for all other non-missing values
- TRUE ~ NA_real_
- ),
- libra_renal = case_when(
- eGFR < 60 ~ 1.1,
- eGFR >= 60 ~ 0,
- TRUE ~ NA_real_
- ),
- libra_heart = case_when(
- cdp_heart_disease == 1 | imh_stroke == 1 | cdp_myocardial == 1 ~ 1.0,
- is.na(cdp_heart_disease) & is.na(imh_stroke) & is.na(cdp_myocardial) ~ NA_real_,
- TRUE ~ 0.0
- )) %>%
- rowwise() %>%
- mutate(
- libra = if (any(is.na(c_across(c(
- libra_obesity, libra_chol, libra_diabetes, libra_hypertension, libra_depression,
- libra_physical, libra_smoke, libra_alcohol, libra_renal, libra_heart
- ))))) {
- NA_real_
- } else {
- sum(c_across(c(
- libra_obesity, libra_chol, libra_diabetes, libra_hypertension, libra_depression,
- libra_physical, libra_smoke, libra_alcohol, libra_renal, libra_heart
- )))
- }
- ) %>%
- ungroup()
- #mCaide
- data.libra_imp = data.libra_imp %>%
- mutate(rapa_total = rapa_1_total + rapa_2_total)
- threshold_rapa = quantile(data.libra_imp$rapa_total, probs = 1/3, na.rm = TRUE)
- data.libra_imp$om_bp_sys_avg = (data.libra_imp$om_bp1_sys + data.libra_imp$om_bp2_sys) / 2
- data.caide_imp = data.libra_imp %>%
- mutate(
- mcaide_age = case_when(
- age <= 64 ~ 0,
- age >= 65 & age < 73 ~ 1,
- age >= 73 ~ 2,
- TRUE ~ NA_real_
- ),
- mcaide_educ = case_when(
- id_education < 12 ~ 2,
- id_education >= 12 & id_education <= 16 ~ 1,
- id_education > 16 ~ 0,
- TRUE ~ NA_real_
- ),
- mcaide_sex = case_when(
- sex == 0 ~ 1,
- sex == 1 ~ 0,
- TRUE ~ NA_real_
- ),
- mcaide_bmi = case_when(
- bmi <= 30 ~ 0,
- bmi > 30 ~ 2,
- TRUE ~ NA_real_
- ),
- mcaide_sbp = case_when(
- om_bp_sys_avg < 140 ~ 0,
- om_bp_sys_avg >= 140 ~ 2,
- TRUE ~ NA_real_
- ),
- mcaide_chol = case_when(
- imh_high_cholesterol == 0 ~ 0,
- imh_high_cholesterol == 1 ~ 2,
- TRUE ~ NA_real_
- ),
- mcaide_phy = case_when(
- rapa_total < threshold_rapa ~ 2,
- rapa_total >= threshold_rapa ~ 0,
- TRUE ~ NA_real_
- ),
- ) %>%
- rowwise() %>%
- mutate(
- mcaide = if(any(is.na(c(mcaide_age, mcaide_educ, mcaide_sex, mcaide_bmi, mcaide_sbp, mcaide_chol, mcaide_phy)))) {
- NA_real_
- } else {
- sum(c(mcaide_age, mcaide_educ, mcaide_sex, mcaide_bmi, mcaide_sbp, mcaide_chol, mcaide_phy), na.rm = TRUE)
- }
- ) %>%
- ungroup()
- # WHICAP
- data_all_imp = data.caide_imp %>%
- mutate(
- whicap_sex = case_when(
- sex == 0 ~ 0,
- sex == 1 ~ 1,
- TRUE ~ NA_real_
- ),
- whicap_age = case_when(
- age <= 70 ~ 0,
- age > 70 & age <= 75 ~ 6,
- age > 75 & age <= 80 ~ 8,
- age > 80 & age <= 85 ~ 13,
- age > 85 ~ 21,
- TRUE ~ NA_real_
- ),
- whichap_diabetes = case_when(
- cdx_diabetes == 0 ~ 0,
- cdx_diabetes ==1 ~ 3,
- TRUE ~ NA_real_
- ),
- whicap_hypertension = case_when(
- cdx_hypertension == 0 ~ 0,
- cdx_hypertension == 1 ~ 1,
- TRUE ~ NA_real_
- ),
- whicap_smoker = case_when(
- smoke_currently == 0 ~ 0,
- smoke_currently == 1 ~ 5,
- TRUE ~ NA_real_
- ),
- whicap_cholesterol = case_when(
- sex == 1 & bw_hdl_chol < 50 ~ 3,
- sex == 1 & bw_hdl_chol >= 50 ~ 0,
- sex == 0 & bw_hdl_chol < 40 ~ 3,
- sex == 0 & bw_hdl_chol >= 40 ~ 0,
- TRUE ~ NA_real_
- ),
- whicap_bmi = case_when(
- bmi > 25 ~ 7,
- bmi <= 25 ~ 0,
- TRUE ~ NA_real_
- ),
- whicap_edu = case_when(
- id_education > 9 ~ 0,
- id_education >= 7 & id_education <= 9 ~ 8,
- id_education <= 6 ~ 11,
- TRUE ~ NA_real_
- ),
- whicap_race = case_when(
- race == "NHW" ~ 0,
- race == "Hispanic" ~ 4,
- race == "Black" ~ 5,
- TRUE ~ NA_real_
- )) %>%
- rowwise() %>%
- mutate(
- whicap = if(any(is.na(c(whicap_sex, whicap_age, whichap_diabetes, whicap_hypertension, whicap_smoker,
- whicap_cholesterol, whicap_bmi, whicap_edu, whicap_race)))) {
- NA_real_
- } else {
- sum(c(whicap_sex, whicap_age, whichap_diabetes, whicap_hypertension, whicap_smoker,
- whicap_cholesterol, whicap_bmi, whicap_edu, whicap_race), na.rm = TRUE)
- }
- ) %>%
- ungroup()
- ```
- ```{r}
- dat = data_all_imp %>%
- as.data.frame() %>%
- mutate(
- cdx_cn_vs_ci = case_when(
- cdx_cog == 0 ~ 1,
- cdx_cog %in% c(1, 2) ~ 0
- ),
- cdx_mci_vs_cn = case_when(
- cdx_cog == 0 ~ 0,
- cdx_cog == 1 ~ 1,
- TRUE ~ NA # drop dementia
- ),
- cdx_dem_vs_cn = case_when(
- cdx_cog == 0 ~ 0,
- cdx_cog == 2 ~ 1,
- TRUE ~ NA # drop MCI
- ),
- cdx_ci_vs_cn = case_when(
- cdx_cog == 0 ~ 0,
- cdx_cog %in% c(1, 2) ~ 1, # MCI + dementia
- TRUE ~ NA
- )
- )
- data = dat %>%
- rowwise() %>%
- mutate(
- cogd_sva = if (any(is.na(c_across(c(
- cogd_obesity, cogd_chol, cogd_diabetes, cogd_stroke, cogd_tbi, cogd_hypertension, cogd_depression, cogd_physical, cogd_smoke, cogd_social
- ))))) {
- NA_real_
- } else {
- sum(c_across(c(
- cogd_obesity, cogd_chol, cogd_diabetes, cogd_stroke, cogd_tbi, cogd_hypertension, cogd_depression, cogd_physical, cogd_smoke, cogd_social
- )))
- },
- mcaide_sva = if (any(is.na(c_across(c(mcaide_bmi, mcaide_sbp, mcaide_chol, mcaide_phy))))) {
- NA_real_
- } else {
- sum(c_across(c(mcaide_bmi, mcaide_sbp, mcaide_chol, mcaide_phy)))
- },
- whicap_sva = if (any(is.na(c_across(c(
- whichap_diabetes, whicap_hypertension, whicap_smoker, whicap_cholesterol, whicap_bmi, whicap_race
- ))))) {
- NA_real_
- } else {
- sum(c_across(c(
- whichap_diabetes, whicap_hypertension, whicap_smoker, whicap_cholesterol, whicap_bmi, whicap_race
- )))
- }
- ) %>%
- mutate(
- libra_age_sva = case_when(
- sex == 0 & age < 65 ~ 0,
- sex == 0 & age >= 65 & age < 69 ~ 0.13,
- sex == 0 & age >= 70 & age <= 74 ~ 1.57,
- sex == 0 & age >= 75 & age <= 79 ~ 2.04,
- sex == 0 & age >= 80 & age <= 84 ~ 3.37,
- sex == 0 & age >= 85 & age <= 89 ~ 4.24,
- sex == 0 & age >= 90 ~ 4.93,
- sex == 1 & age < 65 ~ 0,
- sex == 1 & age >= 65 & age <= 69 ~ 0.64,
- sex == 1 & age >= 70 & age <= 74 ~ 1.87,
- sex == 1 & age >= 75 & age <= 79 ~ 2.75,
- sex == 1 & age >= 80 & age <= 84 ~ 3.71,
- sex == 1 & age >= 85 & age <= 89 ~ 4.58,
- sex == 1 & age >= 90 ~ 5.28,
- TRUE ~ NA_real_
- ),
- libra_edu_sva = case_when(
- id_education > 11 ~ 0,
- id_education >= 8 & id_education >= 11 ~ 0.42,
- id_education < 8 ~ 0.80,
- TRUE ~ NA_real_
- )) %>%
- rowwise() %>%
- mutate(
- libra_sva = if (any(is.na(c_across(c(
- libra_age_sva, libra_edu_sva, libra_obesity, libra_chol, libra_diabetes, libra_hypertension,
- libra_depression, libra_physical, libra_smoke, libra_alcohol, libra_renal, libra_heart
- ))))) {
- NA_real_
- } else {
- sum(c_across(c(
- libra_age_sva, libra_edu_sva, libra_obesity, libra_chol, libra_diabetes, libra_hypertension,
- libra_depression, libra_physical, libra_smoke, libra_alcohol, libra_renal, libra_heart
- )))
- }
- ) %>%
- ungroup() %>%
- rename_with(~ paste0(.x, "_org"),
- .cols = c(cogd, mcaide, libra, whicap,
- cogd_sva, mcaide_sva, libra_sva, whicap_sva)) %>%
- mutate(across(ends_with("_org"),
- ~ as.numeric(scale(.)),
- .names = "{sub('_org$', '', .col)}"))
- ```
- ## Regression
- ### Linear - All
- ```{r}
- all_num_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'ef', 'all', 'base', 'interview_language + age + sex + id_education + apoe',
- 'em', 'all', 'base', 'interview_language + age + sex + id_education + apoe',
- 'va', 'all', 'base', 'interview_language + age + sex + id_education + apoe',
- 'mmse_total', 'all', 'base', 'apoe + age + sex + id_education + interview_language',
- 'cdr', 'all', 'base', 'apoe + age + sex + id_education + interview_language',
- 'ab40', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42_ab40', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'tau', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ptau', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'nfl', 'all', 'base', 'apoe + age + sex + bmi + eGFR',
- 'meta_roi', 'all', 'base', 'apoe + age + sex + icv',
- 'z_hippcampul_vol', 'all', 'base', 'apoe + age + sex + icv',
- 'wmh_volume_log', 'all', 'base', 'apoe + age + sex + icv',
- #Demographics - apoe
- 'ef', 'all', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'em', 'all', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'va', 'all', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'mmse_total', 'all', 'base_noapoe', 'age + sex + id_education + interview_language',
- 'cdr', 'all', 'base_noapoe', 'age + sex + id_education + interview_language',
- 'ab40', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ab42', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ab42_ab40', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'tau', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ptau', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'nfl', 'all', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'meta_roi', 'all', 'base_noapoe', 'age + sex + icv',
- 'z_hippcampul_vol', 'all', 'base_noapoe', 'age + sex + icv',
- 'wmh_volume_log', 'all', 'base_noapoe', 'age + sex + icv',
- #mCAIDE
- 'ef', 'all', 'mcaide', 'interview_language + apoe + mcaide',
- 'em', 'all', 'mcaide', 'interview_language + apoe + mcaide',
- 'va', 'all', 'mcaide', 'interview_language + apoe + mcaide',
- 'mmse_total', 'all', 'mcaide', 'interview_language + apoe + mcaide',
- 'cdr', 'all', 'mcaide', 'interview_language + apoe + mcaide',
- 'ab40', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42_ab40', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'tau', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'ptau', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'nfl', 'all', 'mcaide', 'apoe + eGFR + mcaide',
- 'meta_roi', 'all', 'mcaide', 'apoe + icv + mcaide',
- 'z_hippcampul_vol', 'all', 'mcaide', 'apoe + icv + mcaide',
- 'wmh_volume_log', 'all', 'mcaide', 'apoe + icv + mcaide',
- # LIBRA
- 'ef', 'all', 'libra', 'interview_language + apoe + libra',
- 'em', 'all', 'libra', 'interview_language + apoe + libra',
- 'va', 'all', 'libra', 'interview_language + apoe + libra',
- 'mmse_total', 'all', 'libra', 'interview_language + apoe + libra',
- 'cdr', 'all', 'libra', 'interview_language + apoe + libra',
- 'ab40', 'all', 'libra', 'apoe + libra',
- 'ab42', 'all', 'libra', 'apoe + libra',
- 'ab42_ab40', 'all', 'libra', 'apoe + libra',
- 'tau', 'all', 'libra', 'apoe + libra',
- 'ptau', 'all', 'libra', 'apoe + libra',
- 'nfl', 'all', 'libra', 'apoe + libra',
- 'meta_roi', 'all', 'libra', 'apoe + icv + libra',
- 'z_hippcampul_vol', 'all', 'libra', 'apoe + icv + libra',
- 'wmh_volume_log', 'all', 'libra', 'apoe + icv + libra',
- # WHICAP
- 'ef', 'all', 'whicap', 'interview_language + apoe + whicap',
- 'em', 'all', 'whicap', 'interview_language + apoe + whicap',
- 'va', 'all', 'whicap', 'interview_language + apoe + whicap',
- 'mmse_total', 'all', 'whicap', 'interview_language + apoe + whicap',
- 'cdr', 'all', 'whicap', 'interview_language + apoe + whicap',
- 'ab40', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'ab42', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'ab42_ab40', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'tau', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'ptau', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'nfl', 'all', 'whicap', 'apoe + eGFR + whicap',
- 'meta_roi', 'all', 'whicap', 'apoe + icv + whicap',
- 'z_hippcampul_vol', 'all', 'whicap', 'apoe + icv + whicap',
- 'wmh_volume_log', 'all', 'whicap', 'apoe + icv + whicap',
- # CogD
- 'ef', 'all', 'cogd', 'interview_language + apoe + cogd',
- 'em', 'all', 'cogd', 'interview_language + apoe + cogd',
- 'va', 'all', 'cogd', 'interview_language + apoe + cogd',
- 'mmse_total', 'all', 'cogd', 'interview_language + apoe + cogd',
- 'cdr', 'all', 'cogd', 'interview_language + apoe + cogd',
- 'ab40', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42_ab40', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'tau', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ptau', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'nfl', 'all', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'meta_roi', 'all', 'cogd', 'apoe + icv + cogd',
- 'z_hippcampul_vol', 'all', 'cogd', 'apoe + icv + cogd',
- 'wmh_volume_log', 'all', 'cogd', 'apoe + icv + cogd',
- # Sensitivity analysis
- #LIBRA
- 'ef', 'all', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'em', 'all', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'va', 'all', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'mmse_total', 'all', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'cdr', 'all', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'ab40', 'all', 'libra_sva', 'apoe + libra_sva',
- 'ab42', 'all', 'libra_sva', 'apoe + libra_sva',
- 'ab42_ab40', 'all', 'libra_sva', 'apoe + libra_sva',
- 'tau', 'all', 'libra_sva', 'apoe + libra_sva',
- 'ptau', 'all', 'libra_sva', 'apoe + libra_sva',
- 'nfl', 'all', 'libra_sva', 'apoe + libra_sva',
- 'meta_roi', 'all', 'libra_sva', 'apoe + icv + libra_sva',
- 'z_hippcampul_vol', 'all', 'libra_sva', 'apoe + icv + libra_sva',
- 'wmh_volume_log', 'all', 'libra_sva', 'apoe + icv + libra_sva',
- #mCAIDE
- 'ef', 'all', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'em', 'all', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'va', 'all', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'mmse_total', 'all', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'cdr', 'all', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'ab40', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42_ab40', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'tau', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ptau', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'nfl', 'all', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'meta_roi', 'all', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'z_hippcampul_vol', 'all', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'wmh_volume_log', 'all', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- #WHICAP
- 'ef', 'all', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'em', 'all', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'va', 'all', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'mmse_total', 'all', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'cdr', 'all', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'ab40', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42_ab40', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'tau', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ptau', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'nfl', 'all', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'meta_roi', 'all', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'z_hippcampul_vol', 'all', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'wmh_volume_log', 'all', 'whicap_sva', 'apoe + icv + whicap_sva',
- #CogD
- 'ef', 'all', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'em', 'all', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'va', 'all', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'mmse_total', 'all', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'cdr', 'all', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'ab40', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42_ab40', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'tau', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ptau', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'nfl', 'all', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'meta_roi', 'all', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'z_hippcampul_vol', 'all', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'wmh_volume_log', 'all', 'cogd_sva', 'apoe + icv + cogd_sva'
- ) %>%
- mutate(eq = glue('{outcome} ~ {predictors}'),
- res = map(eq, lm, data = data),
- dataf = map(res, tidy),
- mod = map(res, glance),
- r2 = map_dbl(mod, ~ .x$r.squared),
- r2.adj = map_dbl(mod, ~ .x$adj.r.squared),
- n = map_int(res, nobs))
- ```
- ### CDX - All
- ```{r}
- all_cdx_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'cdx_cn_vs_ci', 'all', 'base', 'age + sex + apoe + id_education',
- 'cdx_mci_vs_cn', 'all', 'base', 'age + sex + apoe + id_education',
- 'cdx_dem_vs_cn', 'all', 'base', 'age + sex + apoe + id_education',
- 'cdx_ci_vs_cn', 'all', 'base', 'age + sex + apoe + id_education',
- #Demographics
- 'cdx_cn_vs_ci', 'all', 'base_noapoe', 'age + sex + id_education',
- 'cdx_mci_vs_cn', 'all', 'base_noapoe', 'age + sex + id_education',
- 'cdx_dem_vs_cn', 'all', 'base_noapoe', 'age + sex + id_education',
- 'cdx_ci_vs_cn', 'all', 'base_noapoe', 'age + sex + id_education',
- #LIBRA
- 'cdx_cn_vs_ci', 'all', 'libra', 'apoe + libra',
- 'cdx_mci_vs_cn', 'all', 'libra', 'apoe + libra',
- 'cdx_dem_vs_cn', 'all', 'libra', 'apoe + libra',
- 'cdx_ci_vs_cn', 'all', 'libra', 'apoe + libra',
- #mCAIDE
- 'cdx_cn_vs_ci', 'all', 'mcaide', 'apoe + mcaide',
- 'cdx_mci_vs_cn', 'all', 'mcaide', 'apoe + mcaide',
- 'cdx_dem_vs_cn', 'all', 'mcaide', 'apoe + mcaide',
- 'cdx_ci_vs_cn', 'all', 'mcaide', 'apoe + mcaide',
- #WHICAP
- 'cdx_cn_vs_ci', 'all', 'whicap', 'apoe + whicap',
- 'cdx_mci_vs_cn', 'all', 'whicap', 'apoe + whicap',
- 'cdx_dem_vs_cn', 'all', 'whicap', 'apoe + whicap',
- 'cdx_ci_vs_cn', 'all', 'whicap', 'apoe + whicap',
- #CogD
- 'cdx_cn_vs_ci', 'all', 'cogd', 'apoe + cogd',
- 'cdx_mci_vs_cn', 'all', 'cogd', 'apoe + cogd',
- 'cdx_dem_vs_cn', 'all', 'cogd', 'apoe + cogd',
- 'cdx_ci_vs_cn', 'all', 'cogd', 'apoe + cogd',
- # Sensitivity analysis
- #LIBRA
- 'cdx_cn_vs_ci', 'all', 'libra_sva', 'apoe + libra_sva',
- 'cdx_mci_vs_cn', 'all', 'libra_sva', 'apoe + libra_sva',
- 'cdx_dem_vs_cn', 'all', 'libra_sva', 'apoe + libra_sva',
- 'cdx_ci_vs_cn', 'all', 'libra_sva', 'apoe + libra_sva',
- #mCAIDE
- 'cdx_cn_vs_ci', 'all', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_mci_vs_cn', 'all', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_dem_vs_cn', 'all', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_ci_vs_cn', 'all', 'mcaide_sva', 'apoe + mcaide_sva',
- #WHICAP
- 'cdx_cn_vs_ci', 'all', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_mci_vs_cn', 'all', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_dem_vs_cn', 'all', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_ci_vs_cn', 'all', 'whicap_sva', 'apoe + whicap_sva',
- #CogD
- 'cdx_cn_vs_ci', 'all', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_mci_vs_cn', 'all', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_dem_vs_cn', 'all', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_ci_vs_cn', 'all', 'cogd_sva', 'apoe + cogd_sva'
- ) %>%
- mutate(
- eq = glue("{outcome} ~ {predictors}"),
- res = map(eq, ~ glm(.x, data = data, family = "binomial")),
- auc = map_dbl(res, ~ {
- y = model.response(model.frame(.x)) # create model.frame(x) which is the exact same data as res
- p = predict(.x, type = "response") # predict fitted probabilities for each outcome
- if (length(unique(y)) > 1) { # if outcome is all 0s or 1s, skip
- as.numeric(pROC::auc(pROC::roc(y, p))) # compute ROC curve then AUC and return numeric number (as.numeric)
- } else {NA_real_}}), # if the outcome has only one class, return NA
- nagelkerke_r2 = map_dbl(res, ~ {
- out = tryCatch(performance::r2_nagelkerke(.x), error = function(e) NA_real_)
- as.numeric(out)}),
- dataf = map(res, tidy),
- mod = map(res, glance),
- n = map_int(res, nobs))
- ```
- ### Linear - Ancestry
- ```{r}
- eur_num_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'ef', 'NHW', 'base', 'interview_language + age + sex + id_education + apoe',
- 'em', 'NHW', 'base', 'interview_language + age + sex + id_education + apoe',
- 'va', 'NHW', 'base', 'interview_language + age + sex + id_education + apoe',
- 'mmse_total', 'NHW', 'base', 'apoe + age + sex + id_education + interview_language',
- 'cdr', 'NHW', 'base', 'apoe + age + sex + id_education + interview_language',
- 'ab40', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42_ab40', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'tau', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ptau', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'nfl', 'NHW', 'base', 'apoe + age + sex + bmi + eGFR',
- 'meta_roi', 'NHW', 'base', 'apoe + age + sex + icv',
- 'z_hippcampul_vol', 'NHW', 'base', 'apoe + age + sex + icv',
- 'wmh_volume_log', 'NHW', 'base', 'apoe + age + sex + icv',
- #Demographics - apoe
- 'ef', 'NHW', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'em', 'NHW', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'va', 'NHW', 'base_noapoe', 'interview_language + age + sex + id_education',
- 'mmse_total', 'NHW', 'base_noapoe', 'age + sex + id_education + interview_language',
- 'cdr', 'NHW', 'base_noapoe', 'age + sex + id_education + interview_language',
- 'ab40', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ab42', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ab42_ab40', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'tau', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'ptau', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'nfl', 'NHW', 'base_noapoe', 'age + sex + bmi + eGFR',
- 'meta_roi', 'NHW', 'base_noapoe', 'age + sex + icv',
- 'z_hippcampul_vol', 'NHW', 'base_noapoe', 'age + sex + icv',
- 'wmh_volume_log', 'NHW', 'base_noapoe', 'age + sex + icv',
- #mCAIDE
- 'ef', 'NHW', 'mcaide', 'interview_language + apoe + mcaide',
- 'em', 'NHW', 'mcaide', 'interview_language + apoe + mcaide',
- 'va', 'NHW', 'mcaide', 'interview_language + apoe + mcaide',
- 'mmse_total', 'NHW', 'mcaide', 'interview_language + apoe + mcaide',
- 'cdr', 'NHW', 'mcaide', 'interview_language + apoe + mcaide',
- 'ab40', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42_ab40', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'tau', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'ptau', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'nfl', 'NHW', 'mcaide', 'apoe + eGFR + mcaide',
- 'meta_roi', 'NHW', 'mcaide', 'apoe + icv + mcaide',
- 'z_hippcampul_vol', 'NHW', 'mcaide', 'apoe + icv + mcaide',
- 'wmh_volume_log', 'NHW', 'mcaide', 'apoe + icv + mcaide',
- # LIBRA
- 'ef', 'NHW', 'libra', 'interview_language + apoe + libra',
- 'em', 'NHW', 'libra', 'interview_language + apoe + libra',
- 'va', 'NHW', 'libra', 'interview_language + apoe + libra',
- 'mmse_total', 'NHW', 'libra', 'interview_language + apoe + libra',
- 'cdr', 'NHW', 'libra', 'interview_language + apoe + libra',
- 'ab40', 'NHW', 'libra', 'apoe + libra',
- 'ab42', 'NHW', 'libra', 'apoe + libra',
- 'ab42_ab40', 'NHW', 'libra', 'apoe + libra',
- 'tau', 'NHW', 'libra', 'apoe + libra',
- 'ptau', 'NHW', 'libra', 'apoe + libra',
- 'nfl', 'NHW', 'libra', 'apoe + libra',
- 'meta_roi', 'NHW', 'libra', 'apoe + icv + libra',
- 'z_hippcampul_vol', 'NHW', 'libra', 'apoe + icv + libra',
- 'wmh_volume_log', 'NHW', 'libra', 'apoe + icv + libra',
- # WHICAP
- 'ef', 'NHW', 'whicap', 'interview_language + apoe + whicap',
- 'em', 'NHW', 'whicap', 'interview_language + apoe + whicap',
- 'va', 'NHW', 'whicap', 'interview_language + apoe + whicap',
- 'mmse_total', 'NHW', 'whicap', 'interview_language + apoe + whicap',
- 'cdr', 'NHW', 'whicap', 'interview_language + apoe + whicap',
- 'ab40', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'ab42', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'ab42_ab40', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'tau', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'ptau', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'nfl', 'NHW', 'whicap', 'apoe + eGFR + whicap',
- 'meta_roi', 'NHW', 'whicap', 'apoe + icv + whicap',
- 'z_hippcampul_vol', 'NHW', 'whicap', 'apoe + icv + whicap',
- 'wmh_volume_log', 'NHW', 'whicap', 'apoe + icv + whicap',
- # CogD
- 'ef', 'NHW', 'cogd', 'interview_language + apoe + cogd',
- 'em', 'NHW', 'cogd', 'interview_language + apoe + cogd',
- 'va', 'NHW', 'cogd', 'interview_language + apoe + cogd',
- 'mmse_total', 'NHW', 'cogd', 'interview_language + apoe + cogd',
- 'cdr', 'NHW', 'cogd', 'interview_language + apoe + cogd',
- 'ab40', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42_ab40', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'tau', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ptau', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'nfl', 'NHW', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'meta_roi', 'NHW', 'cogd', 'apoe + icv + cogd',
- 'z_hippcampul_vol', 'NHW', 'cogd', 'apoe + icv + cogd',
- 'wmh_volume_log', 'NHW', 'cogd', 'apoe + icv + cogd',
- # Sensitivity analysis
- #LIBRA
- 'ef', 'NHW', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'em', 'NHW', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'va', 'NHW', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'mmse_total', 'NHW', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'cdr', 'NHW', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'ab40', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'ab42', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'ab42_ab40', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'tau', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'ptau', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'nfl', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'meta_roi', 'NHW', 'libra_sva', 'apoe + icv + libra_sva',
- 'z_hippcampul_vol', 'NHW', 'libra_sva', 'apoe + icv + libra_sva',
- 'wmh_volume_log', 'NHW', 'libra_sva', 'apoe + icv + libra_sva',
- #mCAIDE
- 'ef', 'NHW', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'em', 'NHW', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'va', 'NHW', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'mmse_total', 'NHW', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'cdr', 'NHW', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'ab40', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42_ab40', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'tau', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ptau', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'nfl', 'NHW', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'meta_roi', 'NHW', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'z_hippcampul_vol', 'NHW', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'wmh_volume_log', 'NHW', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- #WHICAP
- 'ef', 'NHW', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'em', 'NHW', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'va', 'NHW', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'mmse_total', 'NHW', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'cdr', 'NHW', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'ab40', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42_ab40', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'tau', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ptau', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'nfl', 'NHW', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'meta_roi', 'NHW', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'z_hippcampul_vol', 'NHW', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'wmh_volume_log', 'NHW', 'whicap_sva', 'apoe + icv + whicap_sva',
- #CogD
- 'ef', 'NHW', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'em', 'NHW', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'va', 'NHW', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'mmse_total', 'NHW', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'cdr', 'NHW', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'ab40', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42_ab40', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'tau', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ptau', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'nfl', 'NHW', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'meta_roi', 'NHW', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'z_hippcampul_vol', 'NHW', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'wmh_volume_log', 'NHW', 'cogd_sva', 'apoe + icv + cogd_sva'
- ) %>%
- mutate(eq = glue('{outcome} ~ {predictors}'),
- res = map(eq, lm, data = filter(data, race == "NHW")),
- dataf = map(res, tidy),
- mod = map(res, glance),
- r2 = map_dbl(mod, ~ .x$r.squared),
- r2.adj = map_dbl(mod, ~ .x$adj.r.squared),
- n = map_int(res, nobs))
- amr_num_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'ef', 'Hispanic', 'base', 'interview_language + age + sex + id_education + apoe',
- 'em', 'Hispanic', 'base', 'interview_language + age + sex + id_education + apoe',
- 'va', 'Hispanic', 'base', 'interview_language + age + sex + id_education + apoe',
- 'mmse_total', 'Hispanic', 'base', 'apoe + age + sex + id_education + interview_language',
- 'cdr', 'Hispanic', 'base', 'apoe + age + sex + id_education + interview_language',
- 'ab40', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42_ab40', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'tau', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ptau', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'nfl', 'Hispanic', 'base', 'apoe + age + sex + bmi + eGFR',
- 'meta_roi', 'Hispanic', 'base', 'apoe + age + sex + icv',
- 'z_hippcampul_vol', 'Hispanic', 'base', 'apoe + age + sex + icv',
- 'wmh_volume_log', 'Hispanic', 'base', 'apoe + age + sex + icv',
- #Demographics - apoe
- 'ef', 'Hispanic', 'noapoe', 'interview_language + age + sex + id_education',
- 'em', 'Hispanic', 'noapoe', 'interview_language + age + sex + id_education',
- 'va', 'Hispanic', 'noapoe', 'interview_language + age + sex + id_education',
- 'mmse_total', 'Hispanic', 'noapoe', 'age + sex + id_education + interview_language',
- 'cdr', 'Hispanic', 'noapoe', 'age + sex + id_education + interview_language',
- 'ab40', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'ab42', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'ab42_ab40', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'tau', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'ptau', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'nfl', 'Hispanic', 'noapoe', 'age + sex + bmi + eGFR',
- 'meta_roi', 'Hispanic', 'noapoe', 'age + sex + icv',
- 'z_hippcampul_vol', 'Hispanic', 'noapoe', 'age + sex + icv',
- 'wmh_volume_log', 'Hispanic', 'noapoe', 'age + sex + icv',
- #mCAIDE
- 'ef', 'Hispanic', 'mcaide', 'interview_language + apoe + mcaide',
- 'em', 'Hispanic', 'mcaide', 'interview_language + apoe + mcaide',
- 'va', 'Hispanic', 'mcaide', 'interview_language + apoe + mcaide',
- 'mmse_total', 'Hispanic', 'mcaide', 'interview_language + apoe + mcaide',
- 'cdr', 'Hispanic', 'mcaide', 'interview_language + apoe + mcaide',
- 'ab40', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42_ab40', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'tau', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'ptau', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'nfl', 'Hispanic', 'mcaide', 'apoe + eGFR + mcaide',
- 'meta_roi', 'Hispanic', 'mcaide', 'apoe + icv + mcaide',
- 'z_hippcampul_vol', 'Hispanic', 'mcaide', 'apoe + icv + mcaide',
- 'wmh_volume_log', 'Hispanic', 'mcaide', 'apoe + icv + mcaide',
- # LIBRA
- 'ef', 'Hispanic', 'libra', 'interview_language + apoe + libra',
- 'em', 'Hispanic', 'libra', 'interview_language + apoe + libra',
- 'va', 'Hispanic', 'libra', 'interview_language + apoe + libra',
- 'mmse_total', 'Hispanic', 'libra', 'interview_language + apoe + libra',
- 'cdr', 'Hispanic', 'libra', 'interview_language + apoe + libra',
- 'ab40', 'Hispanic', 'libra', 'apoe + libra',
- 'ab42', 'Hispanic', 'libra', 'apoe + libra',
- 'ab42_ab40', 'Hispanic', 'libra', 'apoe + libra',
- 'tau', 'Hispanic', 'libra', 'apoe + libra',
- 'ptau', 'Hispanic', 'libra', 'apoe + libra',
- 'nfl', 'Hispanic', 'libra', 'apoe + libra',
- 'meta_roi', 'Hispanic', 'libra', 'apoe + icv + libra',
- 'z_hippcampul_vol', 'Hispanic', 'libra', 'apoe + icv + libra',
- 'wmh_volume_log', 'Hispanic', 'libra', 'apoe + icv + libra',
- # WHICAP
- 'ef', 'Hispanic', 'whicap', 'interview_language + apoe + whicap',
- 'em', 'Hispanic', 'whicap', 'interview_language + apoe + whicap',
- 'va', 'Hispanic', 'whicap', 'interview_language + apoe + whicap',
- 'mmse_total', 'Hispanic', 'whicap', 'interview_language + apoe + whicap',
- 'cdr', 'Hispanic', 'whicap', 'interview_language + apoe + whicap',
- 'ab40', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'ab42', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'ab42_ab40', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'tau', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'ptau', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'nfl', 'Hispanic', 'whicap', 'apoe + eGFR + whicap',
- 'meta_roi', 'Hispanic', 'whicap', 'apoe + icv + whicap',
- 'z_hippcampul_vol', 'Hispanic', 'whicap', 'apoe + icv + whicap',
- 'wmh_volume_log', 'Hispanic', 'whicap', 'apoe + icv + whicap',
- # CogD
- 'ef', 'Hispanic', 'cogd', 'interview_language + apoe + cogd',
- 'em', 'Hispanic', 'cogd', 'interview_language + apoe + cogd',
- 'va', 'Hispanic', 'cogd', 'interview_language + apoe + cogd',
- 'mmse_total', 'Hispanic', 'cogd', 'interview_language + apoe + cogd',
- 'cdr', 'Hispanic', 'cogd', 'interview_language + apoe + cogd',
- 'ab40', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42_ab40', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'tau', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ptau', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'nfl', 'Hispanic', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'meta_roi', 'Hispanic', 'cogd', 'apoe + icv + cogd',
- 'z_hippcampul_vol', 'Hispanic', 'cogd', 'apoe + icv + cogd',
- 'wmh_volume_log', 'Hispanic', 'cogd', 'apoe + icv + cogd',
- # Sensitivity analysis
- #LIBRA
- 'ef', 'Hispanic', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'em', 'Hispanic', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'va', 'Hispanic', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'mmse_total', 'Hispanic', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'cdr', 'Hispanic', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'ab40', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'ab42', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'ab42_ab40', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'tau', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'ptau', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'nfl', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'meta_roi', 'Hispanic', 'libra_sva', 'apoe + icv + libra_sva',
- 'z_hippcampul_vol', 'Hispanic', 'libra_sva', 'apoe + icv + libra_sva',
- 'wmh_volume_log', 'Hispanic', 'libra_sva', 'apoe + icv + libra_sva',
- #mCAIDE
- 'ef', 'Hispanic', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'em', 'Hispanic', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'va', 'Hispanic', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'mmse_total', 'Hispanic', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'cdr', 'Hispanic', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'ab40', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42_ab40', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'tau', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ptau', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'nfl', 'Hispanic', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'meta_roi', 'Hispanic', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'z_hippcampul_vol', 'Hispanic', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'wmh_volume_log', 'Hispanic', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- #WHICAP
- 'ef', 'Hispanic', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'em', 'Hispanic', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'va', 'Hispanic', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'mmse_total', 'Hispanic', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'cdr', 'Hispanic', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'ab40', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42_ab40', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'tau', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ptau', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'nfl', 'Hispanic', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'meta_roi', 'Hispanic', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'z_hippcampul_vol', 'Hispanic', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'wmh_volume_log', 'Hispanic', 'whicap_sva', 'apoe + icv + whicap_sva',
- #CogD
- 'ef', 'Hispanic', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'em', 'Hispanic', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'va', 'Hispanic', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'mmse_total', 'Hispanic', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'cdr', 'Hispanic', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'ab40', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42_ab40', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'tau', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ptau', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'nfl', 'Hispanic', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'meta_roi', 'Hispanic', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'z_hippcampul_vol', 'Hispanic', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'wmh_volume_log', 'Hispanic', 'cogd_sva', 'apoe + icv + cogd_sva'
- ) %>%
- mutate(eq = glue('{outcome} ~ {predictors}'),
- res = map(eq, lm, data = filter(data, race == "Hispanic")),
- dataf = map(res, tidy),
- mod = map(res, glance),
- r2 = map_dbl(mod, ~ .x$r.squared),
- r2.adj = map_dbl(mod, ~ .x$adj.r.squared),
- n = map_int(res, nobs))
- afr_num_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'ef', 'Black', 'base', 'interview_language + age + sex + id_education + apoe',
- 'em', 'Black', 'base', 'interview_language + age + sex + id_education + apoe',
- 'va', 'Black', 'base', 'interview_language + age + sex + id_education + apoe',
- 'mmse_total', 'Black', 'base', 'apoe + age + sex + id_education + interview_language',
- 'cdr', 'Black', 'base', 'apoe + age + sex + id_education + interview_language',
- 'ab40', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ab42_ab40', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'tau', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'ptau', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'nfl', 'Black', 'base', 'apoe + age + sex + bmi + eGFR',
- 'meta_roi', 'Black', 'base', 'apoe + age + sex + icv',
- 'z_hippcampul_vol', 'Black', 'base', 'apoe + age + sex + icv',
- 'wmh_volume_log', 'Black', 'base', 'apoe + age + sex + icv',
- #Demographics - apoe
- 'ef', 'Black', 'noapoe', 'interview_language + age + sex + id_education',
- 'em', 'Black', 'noapoe', 'interview_language + age + sex + id_education',
- 'va', 'Black', 'noapoe', 'interview_language + age + sex + id_education',
- 'mmse_total', 'Black', 'noapoe', 'age + sex + id_education + interview_language',
- 'cdr', 'Black', 'noapoe', 'age + sex + id_education + interview_language',
- 'ab40', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'ab42', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'ab42_ab40', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'tau', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'ptau', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'nfl', 'Black', 'noapoe', 'age + sex + bmi + eGFR',
- 'meta_roi', 'Black', 'noapoe', 'age + sex + icv',
- 'z_hippcampul_vol', 'Black', 'noapoe', 'age + sex + icv',
- 'wmh_volume_log', 'Black', 'noapoe', 'age + sex + icv',
- #mCAIDE
- 'ef', 'Black', 'mcaide', 'interview_language + apoe + mcaide',
- 'em', 'Black', 'mcaide', 'interview_language + apoe + mcaide',
- 'va', 'Black', 'mcaide', 'interview_language + apoe + mcaide',
- 'mmse_total', 'Black', 'mcaide', 'interview_language + apoe + mcaide',
- 'cdr', 'Black', 'mcaide', 'interview_language + apoe + mcaide',
- 'ab40', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'ab42_ab40', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'tau', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'ptau', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'nfl', 'Black', 'mcaide', 'apoe + eGFR + mcaide',
- 'meta_roi', 'Black', 'mcaide', 'apoe + icv + mcaide',
- 'z_hippcampul_vol', 'Black', 'mcaide', 'apoe + icv + mcaide',
- 'wmh_volume_log', 'Black', 'mcaide', 'apoe + icv + mcaide',
- # LIBRA
- 'ef', 'Black', 'libra', 'interview_language + apoe + libra',
- 'em', 'Black', 'libra', 'interview_language + apoe + libra',
- 'va', 'Black', 'libra', 'interview_language + apoe + libra',
- 'mmse_total', 'Black', 'libra', 'interview_language + apoe + libra',
- 'cdr', 'Black', 'libra', 'interview_language + apoe + libra',
- 'ab40', 'Black', 'libra', 'apoe + libra',
- 'ab42', 'Black', 'libra', 'apoe + libra',
- 'ab42_ab40', 'Black', 'libra', 'apoe + libra',
- 'tau', 'Black', 'libra', 'apoe + libra',
- 'ptau', 'Black', 'libra', 'apoe + libra',
- 'nfl', 'Black', 'libra', 'apoe + libra',
- 'meta_roi', 'Black', 'libra', 'apoe + icv + libra',
- 'z_hippcampul_vol', 'Black', 'libra', 'apoe + icv + libra',
- 'wmh_volume_log', 'Black', 'libra', 'apoe + icv + libra',
- # WHICAP
- 'ef', 'Black', 'whicap', 'interview_language + apoe + whicap',
- 'em', 'Black', 'whicap', 'interview_language + apoe + whicap',
- 'va', 'Black', 'whicap', 'interview_language + apoe + whicap',
- 'mmse_total', 'Black', 'whicap', 'interview_language + apoe + whicap',
- 'cdr', 'Black', 'whicap', 'interview_language + apoe + whicap',
- 'ab40', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'ab42', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'ab42_ab40', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'tau', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'ptau', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'nfl', 'Black', 'whicap', 'apoe + eGFR + whicap',
- 'meta_roi', 'Black', 'whicap', 'apoe + icv + whicap',
- 'z_hippcampul_vol', 'Black', 'whicap', 'apoe + icv + whicap',
- 'wmh_volume_log', 'Black', 'whicap', 'apoe + icv + whicap',
- # CogD
- 'ef', 'Black', 'cogd', 'interview_language + apoe + cogd',
- 'em', 'Black', 'cogd', 'interview_language + apoe + cogd',
- 'va', 'Black', 'cogd', 'interview_language + apoe + cogd',
- 'mmse_total', 'Black', 'cogd', 'interview_language + apoe + cogd',
- 'cdr', 'Black', 'cogd', 'interview_language + apoe + cogd',
- 'ab40', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ab42_ab40', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'tau', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'ptau', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'nfl', 'Black', 'cogd', 'apoe + bmi + eGFR + cogd',
- 'meta_roi', 'Black', 'cogd', 'apoe + icv + cogd',
- 'z_hippcampul_vol', 'Black', 'cogd', 'apoe + icv + cogd',
- 'wmh_volume_log', 'Black', 'cogd', 'apoe + icv + cogd',
- # Sensitivity analysis
- #LIBRA
- 'ef', 'Black', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'em', 'Black', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'va', 'Black', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'mmse_total', 'Black', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'cdr', 'Black', 'libra_sva', 'interview_language + apoe + libra_sva',
- 'ab40', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'ab42', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'ab42_ab40', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'tau', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'ptau', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'nfl', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'meta_roi', 'Black', 'libra_sva', 'apoe + icv + libra_sva',
- 'z_hippcampul_vol', 'Black', 'libra_sva', 'apoe + icv + libra_sva',
- 'wmh_volume_log', 'Black', 'libra_sva', 'apoe + icv + libra_sva',
- #mCAIDE
- 'ef', 'Black', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'em', 'Black', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'va', 'Black', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'mmse_total', 'Black', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'cdr', 'Black', 'mcaide_sva', 'interview_language + apoe + mcaide_sva',
- 'ab40', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ab42_ab40', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'tau', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'ptau', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'nfl', 'Black', 'mcaide_sva', 'apoe + eGFR + mcaide_sva',
- 'meta_roi', 'Black', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'z_hippcampul_vol', 'Black', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- 'wmh_volume_log', 'Black', 'mcaide_sva', 'apoe + icv + mcaide_sva',
- #WHICAP
- 'ef', 'Black', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'em', 'Black', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'va', 'Black', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'mmse_total', 'Black', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'cdr', 'Black', 'whicap_sva', 'interview_language + apoe + whicap_sva',
- 'ab40', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ab42_ab40', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'tau', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'ptau', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'nfl', 'Black', 'whicap_sva', 'apoe + eGFR + whicap_sva',
- 'meta_roi', 'Black', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'z_hippcampul_vol', 'Black', 'whicap_sva', 'apoe + icv + whicap_sva',
- 'wmh_volume_log', 'Black', 'whicap_sva', 'apoe + icv + whicap_sva',
- #CogD
- 'ef', 'Black', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'em', 'Black', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'va', 'Black', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'mmse_total', 'Black', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'cdr', 'Black', 'cogd_sva', 'interview_language + apoe + cogd_sva',
- 'ab40', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ab42_ab40', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'tau', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'ptau', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'nfl', 'Black', 'cogd_sva', 'apoe + eGFR + cogd_sva',
- 'meta_roi', 'Black', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'z_hippcampul_vol', 'Black', 'cogd_sva', 'apoe + icv + cogd_sva',
- 'wmh_volume_log', 'Black', 'cogd_sva', 'apoe + icv + cogd_sva'
- ) %>%
- mutate(eq = glue('{outcome} ~ {predictors}'),
- res = map(eq, lm, data = filter(data, race == "Black")),
- dataf = map(res, tidy),
- mod = map(res, glance),
- r2 = map_dbl(mod, ~ .x$r.squared),
- r2.adj = map_dbl(mod, ~ .x$adj.r.squared),
- n = map_int(res, nobs))
- ```
- ### CDX - Ancestry
- ```{r}
- eur_cdx_prs = tribble( ~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'cdx_cn_vs_ci', 'NHW', 'base', 'age + sex + apoe + id_education',
- 'cdx_mci_vs_cn', 'NHW', 'base', 'age + sex + apoe + id_education',
- 'cdx_dem_vs_cn', 'NHW', 'base', 'age + sex + apoe + id_education',
- 'cdx_ci_vs_cn', 'NHW', 'base', 'age + sex + apoe + id_education',
- #Demographics
- 'cdx_cn_vs_ci', 'NHW', 'base_noapoe', 'age + sex + id_education',
- 'cdx_mci_vs_cn', 'NHW', 'base_noapoe', 'age + sex + id_education',
- 'cdx_dem_vs_cn', 'NHW', 'base_noapoe', 'age + sex + id_education',
- 'cdx_ci_vs_cn', 'NHW', 'base_noapoe', 'age + sex + id_education',
- #LIBRA
- 'cdx_cn_vs_ci', 'NHW', 'libra', 'apoe + libra',
- 'cdx_mci_vs_cn', 'NHW', 'libra', 'apoe + libra',
- 'cdx_dem_vs_cn', 'NHW', 'libra', 'apoe + libra',
- 'cdx_ci_vs_cn', 'NHW', 'libra', 'apoe + libra',
- #mCAIDE
- 'cdx_cn_vs_ci', 'NHW', 'mcaide', 'apoe + mcaide',
- 'cdx_mci_vs_cn', 'NHW', 'mcaide', 'apoe + mcaide',
- 'cdx_dem_vs_cn', 'NHW', 'mcaide', 'apoe + mcaide',
- 'cdx_ci_vs_cn', 'NHW', 'mcaide', 'apoe + mcaide',
- #WHICAP
- 'cdx_cn_vs_ci', 'NHW', 'whicap', 'apoe + whicap',
- 'cdx_mci_vs_cn', 'NHW', 'whicap', 'apoe + whicap',
- 'cdx_dem_vs_cn', 'NHW', 'whicap', 'apoe + whicap',
- 'cdx_ci_vs_cn', 'NHW', 'whicap', 'apoe + whicap',
- #CogD
- 'cdx_cn_vs_ci', 'NHW', 'cogd', 'apoe + cogd',
- 'cdx_mci_vs_cn', 'NHW', 'cogd', 'apoe + cogd',
- 'cdx_dem_vs_cn', 'NHW', 'cogd', 'apoe + cogd',
- 'cdx_ci_vs_cn', 'NHW', 'cogd', 'apoe + cogd',
- # Sensitivity analysis
- #LIBRA
- 'cdx_cn_vs_ci', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'cdx_mci_vs_cn', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'cdx_dem_vs_cn', 'NHW', 'libra_sva', 'apoe + libra_sva',
- 'cdx_ci_vs_cn', 'NHW', 'libra_sva', 'apoe + libra_sva',
- #mCAIDE
- 'cdx_cn_vs_ci', 'NHW', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_mci_vs_cn', 'NHW', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_dem_vs_cn', 'NHW', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_ci_vs_cn', 'NHW', 'mcaide_sva', 'apoe + mcaide_sva',
- #WHICAP
- 'cdx_cn_vs_ci', 'NHW', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_mci_vs_cn', 'NHW', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_dem_vs_cn', 'NHW', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_ci_vs_cn', 'NHW', 'whicap_sva', 'apoe + whicap_sva',
- #CogD
- 'cdx_cn_vs_ci', 'NHW', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_mci_vs_cn', 'NHW', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_dem_vs_cn', 'NHW', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_ci_vs_cn', 'NHW', 'cogd_sva', 'apoe + cogd_sva'
- ) %>%
- mutate(
- eq = glue("{outcome} ~ {predictors}"),
- res = map(eq, glm, data = filter(data, race == "NHW"), family = "binomial"),
- auc = map_dbl(res, ~ {
- y = model.response(model.frame(.x)) # create model.frame(x) which is the exact same data as res
- p = predict(.x, type = "response") # predict fitted probabilities for each outcome
- if (length(unique(y)) > 1) { # if outcome is all 0s or 1s, skip
- as.numeric(pROC::auc(pROC::roc(y, p))) # compute ROC curve then AUC and return numeric number (as.numeric)
- } else {NA_real_}}), # if the outcome has only one class, return NA
- nagelkerke_r2 = map_dbl(res, ~ {
- out = tryCatch(performance::r2_nagelkerke(.x), error = function(e) NA_real_)
- as.numeric(out)}),
- dataf = map(res, tidy),
- mod = map(res, glance),
- n = map_int(res, nobs))
- amr_cdx_prs = tribble( ~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'cdx_cn_vs_ci', 'Hispanic', 'base', 'age + sex + apoe + id_education',
- 'cdx_mci_vs_cn', 'Hispanic', 'base', 'age + sex + apoe + id_education',
- 'cdx_dem_vs_cn', 'Hispanic', 'base', 'age + sex + apoe + id_education',
- 'cdx_ci_vs_cn', 'Hispanic', 'base', 'age + sex + apoe + id_education',
- #Demographics
- 'cdx_cn_vs_ci', 'Hispanic', 'base_noapoe', 'age + sex + id_education',
- 'cdx_mci_vs_cn', 'Hispanic', 'base_noapoe', 'age + sex + id_education',
- 'cdx_dem_vs_cn', 'Hispanic', 'base_noapoe', 'age + sex + id_education',
- 'cdx_ci_vs_cn', 'Hispanic', 'base_noapoe', 'age + sex + id_education',
- #LIBRA
- 'cdx_cn_vs_ci', 'Hispanic', 'libra', 'apoe + libra',
- 'cdx_mci_vs_cn', 'Hispanic', 'libra', 'apoe + libra',
- 'cdx_dem_vs_cn', 'Hispanic', 'libra', 'apoe + libra',
- 'cdx_ci_vs_cn', 'Hispanic', 'libra', 'apoe + libra',
- #mCAIDE
- 'cdx_cn_vs_ci', 'Hispanic', 'mcaide', 'apoe + mcaide',
- 'cdx_mci_vs_cn', 'Hispanic', 'mcaide', 'apoe + mcaide',
- 'cdx_dem_vs_cn', 'Hispanic', 'mcaide', 'apoe + mcaide',
- 'cdx_ci_vs_cn', 'Hispanic', 'mcaide', 'apoe + mcaide',
- #WHICAP
- 'cdx_cn_vs_ci', 'Hispanic', 'whicap', 'apoe + whicap',
- 'cdx_mci_vs_cn', 'Hispanic', 'whicap', 'apoe + whicap',
- 'cdx_dem_vs_cn', 'Hispanic', 'whicap', 'apoe + whicap',
- 'cdx_ci_vs_cn', 'Hispanic', 'whicap', 'apoe + whicap',
- #CogD
- 'cdx_cn_vs_ci', 'Hispanic', 'cogd', 'apoe + cogd',
- 'cdx_mci_vs_cn', 'Hispanic', 'cogd', 'apoe + cogd',
- 'cdx_dem_vs_cn', 'Hispanic', 'cogd', 'apoe + cogd',
- 'cdx_ci_vs_cn', 'Hispanic', 'cogd', 'apoe + cogd',
- # Sensitivity analysis
- #LIBRA
- 'cdx_cn_vs_ci', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'cdx_mci_vs_cn', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'cdx_dem_vs_cn', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- 'cdx_ci_vs_cn', 'Hispanic', 'libra_sva', 'apoe + libra_sva',
- #mCAIDE
- 'cdx_cn_vs_ci', 'Hispanic', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_mci_vs_cn', 'Hispanic', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_dem_vs_cn', 'Hispanic', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_ci_vs_cn', 'Hispanic', 'mcaide_sva', 'apoe + mcaide_sva',
- #WHICAP
- 'cdx_cn_vs_ci', 'Hispanic', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_mci_vs_cn', 'Hispanic', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_dem_vs_cn', 'Hispanic', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_ci_vs_cn', 'Hispanic', 'whicap_sva', 'apoe + whicap_sva',
- #CogD
- 'cdx_cn_vs_ci', 'Hispanic', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_mci_vs_cn', 'Hispanic', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_dem_vs_cn', 'Hispanic', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_ci_vs_cn', 'Hispanic', 'cogd_sva', 'apoe + cogd_sva'
- ) %>%
- mutate(
- eq = glue("{outcome} ~ {predictors}"),
- res = map(eq, glm, data = filter(data, race == "Hispanic"), family = "binomial"),
- auc = map_dbl(res, ~ {
- y = model.response(model.frame(.x)) # create model.frame(x) which is the exact same data as res
- p = predict(.x, type = "response") # predict fitted probabilities for each outcome
- if (length(unique(y)) > 1) { # if outcome is all 0s or 1s, skip
- as.numeric(pROC::auc(pROC::roc(y, p))) # compute ROC curve then AUC and return numeric number (as.numeric)
- } else {NA_real_}}), # if the outcome has only one class, return NA
- nagelkerke_r2 = map_dbl(res, ~ {
- out = tryCatch(performance::r2_nagelkerke(.x), error = function(e) NA_real_)
- as.numeric(out)}),
- dataf = map(res, tidy),
- mod = map(res, glance),
- n = map_int(res, nobs))
- afr_cdx_prs = tribble(~outcome, ~pop, ~model, ~predictors,
- #Demographics
- 'cdx_cn_vs_ci', 'Black', 'base', 'age + sex + apoe + id_education',
- 'cdx_mci_vs_cn', 'Black', 'base', 'age + sex + apoe + id_education',
- 'cdx_dem_vs_cn', 'Black', 'base', 'age + sex + apoe + id_education',
- 'cdx_ci_vs_cn', 'Black', 'base', 'age + sex + apoe + id_education',
- #Demographics
- 'cdx_cn_vs_ci', 'Black', 'base_noapoe', 'age + sex + id_education',
- 'cdx_mci_vs_cn', 'Black', 'base_noapoe', 'age + sex + id_education',
- 'cdx_dem_vs_cn', 'Black', 'base_noapoe', 'age + sex + id_education',
- 'cdx_ci_vs_cn', 'Black', 'base_noapoe', 'age + sex + id_education',
- #LIBRA
- 'cdx_cn_vs_ci', 'Black', 'libra', 'apoe + libra',
- 'cdx_mci_vs_cn', 'Black', 'libra', 'apoe + libra',
- 'cdx_dem_vs_cn', 'Black', 'libra', 'apoe + libra',
- 'cdx_ci_vs_cn', 'Black', 'libra', 'apoe + libra',
- #mCAIDE
- 'cdx_cn_vs_ci', 'Black', 'mcaide', 'apoe + mcaide',
- 'cdx_mci_vs_cn', 'Black', 'mcaide', 'apoe + mcaide',
- 'cdx_dem_vs_cn', 'Black', 'mcaide', 'apoe + mcaide',
- 'cdx_ci_vs_cn', 'Black', 'mcaide', 'apoe + mcaide',
- #WHICAP
- 'cdx_cn_vs_ci', 'Black', 'whicap', 'apoe + whicap',
- 'cdx_mci_vs_cn', 'Black', 'whicap', 'apoe + whicap',
- 'cdx_dem_vs_cn', 'Black', 'whicap', 'apoe + whicap',
- 'cdx_ci_vs_cn', 'Black', 'whicap', 'apoe + whicap',
- #CogD
- 'cdx_cn_vs_ci', 'Black', 'cogd', 'apoe + cogd',
- 'cdx_mci_vs_cn', 'Black', 'cogd', 'apoe + cogd',
- 'cdx_dem_vs_cn', 'Black', 'cogd', 'apoe + cogd',
- 'cdx_ci_vs_cn', 'Black', 'cogd', 'apoe + cogd',
- # Sensitivity analysis
- #LIBRA
- 'cdx_cn_vs_ci', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'cdx_mci_vs_cn', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'cdx_dem_vs_cn', 'Black', 'libra_sva', 'apoe + libra_sva',
- 'cdx_ci_vs_cn', 'Black', 'libra_sva', 'apoe + libra_sva',
- #mCAIDE
- 'cdx_cn_vs_ci', 'Black', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_mci_vs_cn', 'Black', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_dem_vs_cn', 'Black', 'mcaide_sva', 'apoe + mcaide_sva',
- 'cdx_ci_vs_cn', 'Black', 'mcaide_sva', 'apoe + mcaide_sva',
- #WHICAP
- 'cdx_cn_vs_ci', 'Black', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_mci_vs_cn', 'Black', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_dem_vs_cn', 'Black', 'whicap_sva', 'apoe + whicap_sva',
- 'cdx_ci_vs_cn', 'Black', 'whicap_sva', 'apoe + whicap_sva',
- #CogD
- 'cdx_cn_vs_ci', 'Black', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_mci_vs_cn', 'Black', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_dem_vs_cn', 'Black', 'cogd_sva', 'apoe + cogd_sva',
- 'cdx_ci_vs_cn', 'Black', 'cogd_sva', 'apoe + cogd_sva'
- ) %>%
- mutate(
- eq = glue("{outcome} ~ {predictors}"),
- res = map(eq, glm, data = filter(data, race == "Black"), family = "binomial"),
- auc = map_dbl(res, ~ {
- y = model.response(model.frame(.x)) # create model.frame(x) which is the exact same data as res
- p = predict(.x, type = "response") # predict fitted probabilities for each outcome
- if (length(unique(y)) > 1) { # if outcome is all 0s or 1s, skip
- as.numeric(pROC::auc(pROC::roc(y, p))) # compute ROC curve then AUC and return numeric number (as.numeric)
- } else {NA_real_}}), # if the outcome has only one class, return NA
- nagelkerke_r2 = map_dbl(res, ~ {
- out = tryCatch(performance::r2_nagelkerke(.x), error = function(e) NA_real_)
- as.numeric(out)}),
- dataf = map(res, tidy),
- mod = map(res, glance),
- n = map_int(res, nobs))
- ```
- ### Coefficients
- ```{r}
- res_crs = bind_rows(
- select(all_num_prs, model, pop, outcome, dataf, res),
- select(all_cdx_prs, model, pop, outcome, dataf, res),
- select(eur_num_prs, model, outcome, pop, dataf, res),
- select(amr_num_prs, model, outcome, pop, dataf, res),
- select(afr_num_prs, model, outcome, pop, dataf, res),
- select(eur_cdx_prs, model, outcome, pop, dataf, res),
- select(amr_cdx_prs, model, outcome, pop, dataf, res),
- select(afr_cdx_prs, model, outcome, pop, dataf, res)
- ) %>%
- unnest(dataf) %>%
- mutate(std_params = map(res, ~ standardize_parameters(.x, method = "posthoc"))) %>%
- unnest(std_params) %>%
- select(-c(res, CI)) %>%
- filter(term %in% c("cogd", "libra", "whicap", "mcaide")) %>%
- filter(!outcome %in% c("cdx_hypertension", "cdx_dyslipidemia", "cdx_diabetes", "bmi", "cdx_anxiety", "cdx_depression", "cdx_cvd", "wmh_volume_log")) %>%
- arrange(pop, term, Std_Coefficient) %>%
- mutate(
- p.fdr = p.adjust(p.value, method = "fdr"),
- sig_fdr = ifelse(p.fdr < 0.05, TRUE, FALSE),
- sig = ifelse(p.value < 0.05, TRUE, FALSE),
- conf.low = estimate - (std.error * 1.96),
- conf.high = estimate + (std.error * 1.96),
- lci = exp(conf.low),
- uci = exp(conf.high),
- or = exp(estimate),
- category = case_when(
- outcome %in% c("va", "em", "ef", "mmse_total", "cdr") ~ "Cognitive \nFunction",
- outcome %in% c("tau", "ptau", "nfl", "ab42", "ab40", "ab42_ab40") ~ "Plasma \nBiomarkers",
- outcome %in% c("meta_roi", "z_hippcampul_vol") ~ "Neuroimaging",
- outcome %in% c("cdx_cn_vs_ci", "cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn") ~ "Medical \nHistory"),
- lab = fct_recode(
- outcome,
- MMSE = "mmse_total",
- CDR = "cdr",
- "Executive\n Function" = "ef",
- "Verbal\n Ability" = "va",
- Memory = "em",
- "Cortical \nThickness" = "meta_roi",
- "Hippo. \nVolume" = "z_hippcampul_vol",
- "Aβ40" = "ab40",
- "Aβ42" = "ab42",
- "Aβ42/Aβ40" = "ab42_ab40",
- "Total Tau" = "tau",
- "pTau" = "ptau",
- NfL = "nfl",
- Healthy = "cdx_cn_vs_ci",
- MCI = "cdx_mci_vs_cn",
- Dementia = "cdx_dem_vs_cn",
- "Cog. Impair." = "cdx_ci_vs_cn"
- ),
- lab = fct_inorder(lab))
- res_crs_sva = bind_rows(
- select(all_num_prs, model, pop, outcome, dataf, res),
- select(all_cdx_prs, model, pop, outcome, dataf, res),
- select(eur_num_prs, model, outcome, pop, dataf, res),
- select(amr_num_prs, model, outcome, pop, dataf, res),
- select(afr_num_prs, model, outcome, pop, dataf, res),
- select(eur_cdx_prs, model, outcome, pop, dataf, res),
- select(amr_cdx_prs, model, outcome, pop, dataf, res),
- select(afr_cdx_prs, model, outcome, pop, dataf, res)
- ) %>%
- unnest(dataf) %>%
- mutate(std_params = map(res, ~ standardize_parameters(.x, method = "posthoc"))) %>%
- unnest(std_params) %>%
- select(-c(res, CI)) %>%
- filter(term %in% c("cogd_sva", "whicap_sva", "mcaide_sva")) %>%
- filter(!outcome %in% c("cdx_hypertension", "cdx_dyslipidemia", "cdx_diabetes", "bmi", "cdx_anxiety", "cdx_depression", "cdx_cvd", "wmh_volume_log")) %>%
- arrange(pop, term, estimate) %>%
- mutate(
- p.fdr = p.adjust(p.value, method = "fdr"),
- sig_fdr = ifelse(p.fdr < 0.05, TRUE, FALSE),
- sig = ifelse(p.value < 0.05, TRUE, FALSE),
- conf.low = estimate - (std.error * 1.96),
- conf.high = estimate + (std.error * 1.96),
- lci = exp(conf.low),
- uci = exp(conf.high),
- or = exp(estimate),
- category = case_when(
- outcome %in% c("va", "em", "ef", "mmse_total", "cdr") ~ "Cognitive \nFunction",
- outcome %in% c("tau", "ptau", "nfl", "ab42", "ab40", "ab42_ab40") ~ "Plasma \nBiomarkers",
- outcome %in% c("meta_roi", "z_hippcampul_vol") ~ "Neuroimaging",
- outcome %in% c("cdx_cn_vs_ci", "cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn") ~ "Medical \nHistory"),
- outcome = factor(outcome, levels = c(
- "cdx_hypertension", "cdx_dyslipidemia", "cdx_diabetes", "cdx_cvd",
- "cdx_anxiety", "cdx_depression", "bmi",
- "mmse_total", "cdr", "ef", "va", "em",
- "meta_roi", "z_hippcampul_vol",
- "ab40", "ab42", "ab42_ab40", "tau", "ptau", "nfl",
- "cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn")),
- lab = fct_recode(
- outcome,
- MMSE = "mmse_total",
- CDR = "cdr",
- "Executive\n Function" = "ef",
- "Verbal\n Ability" = "va",
- Memory = "em",
- "Cortical \nThickness" = "meta_roi",
- "Hippo. \nVolume" = "z_hippcampul_vol",
- "Aβ40" = "ab40",
- "Aβ42" = "ab42",
- "Aβ42/Aβ40" = "ab42_ab40",
- "Total Tau" = "tau",
- "pTau" = "ptau",
- NfL = "nfl",
- Healthy = "cdx_cn_vs_ci",
- MCI = "cdx_mci_vs_cn",
- Dementia = "cdx_dem_vs_cn",
- "Cog. Impair." = "cdx_ci_vs_cn"
- ),
- lab = fct_inorder(lab))
- ```
- ### Z-test
- ```{r}
- compare_coefs = function(b1, b2, se1, se2, return_pval = FALSE) {
- z = (b1 - b2) / sqrt(se1^2 + se2^2)
- if (return_pval) {
- return(2 * (1 - pnorm(abs(z))))
- } else {
- return(z)
- }
- }
- res_diff = res_crs %>%
- filter(Parameter %in% c("mcaide", "cogd", "libra", "whicap")) %>%
- select(term, lab, pop, Std_Coefficient, std.error, category) %>%
- filter(!lab %in% c("Aβ42", "Aβ40")) %>%
- group_by(term, lab, category) %>%
- group_modify(~ {
- pops = unique(.x$pop[.x$pop != "all"])
- if(length(pops) < 2) return(tibble())
- pairs = t(combn(pops, 2)) %>% as.data.frame()
- colnames(pairs) = c("pop1", "pop2")
- map_dfr(1:nrow(pairs), function(i) {
- p1 = pairs$pop1[i]
- p2 = pairs$pop2[i]
- b1 = .x$Std_Coefficient[.x$pop == p1]
- b2 = .x$Std_Coefficient[.x$pop == p2]
- se1 = .x$std.error[.x$pop == p1]
- se2 = .x$std.error[.x$pop == p2]
- z = compare_coefs(b1, b2, se1, se2)
- p = compare_coefs(b1, b2, se1, se2, return_pval = TRUE)
- tibble(
- pop1 = p1,
- pop2 = p2,
- z_score = z,
- p_diff = p
- )
- })
- }) %>%
- ungroup() %>%
- mutate(p_diff_fdr = p.adjust(p_diff, method = "fdr")) %>%
- mutate(
- term = recode(term, mcaide = "mCAIDE", whicap = "WHICAP", libra = "LIBRA", cogd = "CogDrisk"),
- term = factor(term, levels = c("mCAIDE", "WHICAP", "LIBRA", "CogDrisk")),
- pop1 = recode(pop1, "Black" = "AA", "Hispanic" = "LA", "NHW" = "NHW"),
- pop2 = recode(pop2, "Black" = "AA", "Hispanic" = "LA", "NHW" = "NHW"),
- pop1 = factor(pop1, levels = c("NHW", "LA", "AA")),
- pop2 = factor(pop2, levels = c("NHW", "LA", "AA"))) %>%
- droplevels()
- res_diff = res_diff %>%
- mutate(label = case_when(p_diff_fdr < 0.001 ~ "***", p_diff_fdr < 0.01 ~ "**", p_diff_fdr < 0.05 ~ "*")) %>%
- rename(
- Model = term,
- Outcome = lab,
- Category = category,
- Pop1 = pop1,
- Pop2 = pop2,
- `Z-score` = z_score,
- `P-Value` = p_diff,
- `P-Value FDR. adj.` = p_diff_fdr,
- Significance = label
- )
- res_sig = res_diff %>%
- filter(p_diff_fdr < 0.05, (pop1 == "NHW" | pop2 == "NHW"))
- res_diff_all = res_all %>%
- select(term, outcome, pop, Std_Coefficient, std.error) %>%
- filter(outcome != "cdx_cn_vs_ci") %>%
- group_by(term, outcome) %>%
- group_modify(~ {
- pops = unique(.x$pop)
- pairs = t(combn(pops, 2)) %>% as.data.frame()
- colnames(pairs) = c("pop1", "pop2")
- map_dfr(1:nrow(pairs), function(i) {
- p1 = pairs$pop1[i]
- p2 = pairs$pop2[i]
- b1 = .x$Std_Coefficient[.x$pop == p1]
- b2 = .x$Std_Coefficient[.x$pop == p2]
- se1 = .x$std.error[.x$pop == p1]
- se2 = .x$std.error[.x$pop == p2]
- z = compare_coefs(b1, b2, se1, se2)
- p = compare_coefs(b1, b2, se1, se2, return_pval = TRUE)
- tibble(
- pop1 = p1,
- pop2 = p2,
- z_score = z,
- p_diff = p)
- })
- }) %>%
- ungroup() %>%
- mutate(p_diff_fdr = p.adjust(p_diff, method = "fdr"))
- ```
- ```{r}
- # publication table - main + sensitivity analysis
- coef_table_pred = bind_rows(res_crs, res_crs_sva) %>%
- select(pop, term, category, lab, p.value, p.fdr, Parameter, Std_Coefficient, CI_low, CI_high) %>%
- filter(Parameter %in% c("cogd", "libra", "whicap", "mcaide", "cogd_sva", "whicap_sva", "mcaide_sva")) %>%
- filter(!lab %in% c("Healthy", "Aβ42", "Aβ40")) %>%
- mutate(term = recode(term,
- "cogd" = "CogDRisk",
- "libra" = "LIBRA",
- "whicap" = "WHICAP",
- "mcaide" = "mCAIDE",
- "cogd_sva" = "CogDRisk (sensitivity)",
- "libra_sva" = "LIBRA (sensitivity)",
- "whicap_sva" = "WHICAP (sensitivity)",
- "mcaide_sva" = "mCAIDE (sensitivity)"),
- lab = fct_recode(lab,
- "Executive Function" = "Executive\n Function",
- "Verbal Ability" = "Verbal\n Ability",
- "Cortical Thickness" = "Cortical \nThickness",
- "Hippocampal Volume" = "Hippo. \nVolume")
- ) %>%
- rename(
- Race = pop,
- CRS = term,
- Category = category,
- Outcome = lab,
- `P-value` = p.value,
- `P-value, FDR adj.` = p.fdr,
- β = Std_Coefficient,
- `Lower Conf. Interval` = CI_low,
- `Upper Conf. Interval` = CI_high
- ) %>%
- select(-Parameter)
- ```
- ### OR
- ```{r}
- # diagnosis only
- color = c(AA = "#E41A1C", LA = "#377EB8", NHW = "#984EA3", all = "black")
- diagnosis = ggplot(res_crs %>%
- filter(
- pop == "all",
- outcome %in% c("cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn"),
- term %in% c("mcaide", "whicap", "libra", "cogd")) %>%
- mutate(
- outcome = recode(outcome,
- cdx_mci_vs_cn = "MCI",
- cdx_dem_vs_cn = "Dementia",
- cdx_ci_vs_cn = "MCI + Dementia"),
- term = recode(term,
- mcaide = "mCAIDE",
- whicap = "WHICAP",
- libra = "LIBRA",
- cogd = "CogDrisk"),
- outcome = factor(outcome, levels = c("MCI", "Dementia", "MCI + Dementia")),
- term = factor(term, levels = c("mCAIDE", "WHICAP", "LIBRA", "CogDrisk")),
- sig_fdr = factor(sig_fdr, levels = c(TRUE, FALSE))
- ),
- aes(x = outcome, y = or, color = term, group = term, alpha = sig_fdr)) +
- geom_point(position = position_dodge(width = 0.5), size = 1.5) +
- geom_errorbar(aes(ymin = lci, ymax = uci),
- position = position_dodge(width = 0.5),
- width = 0, size = 0.8) +
- geom_hline(yintercept = 1, linetype = 2) +
- scale_alpha_manual(values = c(`TRUE` = 1, `FALSE` = 0.1)) +
- scale_color_manual(values = c("mCAIDE" = "#003DE6",
- "WHICAP" = "#d95f02",
- "LIBRA" = "#F22424",
- "CogDrisk" = "#005713")) +
- ggtitle("All") +
- labs(x = "", y = "Odds Ratio", color = "CRS", alpha = "FDR p < 0.05") +
- theme_bw() +
- theme(
- axis.text.x = element_text(size = 8, angle = 0, hjust = 0.5),
- axis.text.y = element_text(size = 8),
- axis.title = element_text(size = 8),
- plot.title = element_text(size = 10, face = "bold", hjust = 0.5),
- legend.title = element_text(size = 8),
- legend.position = "none",
- strip.background = element_blank(),
- strip.text = element_text(face = "bold", size = 10)
- )
- diagnosis_race = ggplot(res_crs %>%
- filter(outcome %in% c("cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn"),
- term %in% c("mcaide", "whicap", "libra", "cogd")) %>%
- mutate(
- outcome = recode(outcome,
- cdx_mci_vs_cn = "MCI",
- cdx_dem_vs_cn = "Dementia",
- cdx_ci_vs_cn = "MCI + Dementia"),
- outcome = factor(outcome, levels = c("MCI", "Dementia", "MCI + Dementia")),
- term = recode(term,
- mcaide = "mCAIDE",
- whicap = "WHICAP",
- libra = "LIBRA",
- cogd = "CogDrisk"),
- term = factor(term, levels = c("mCAIDE", "WHICAP", "LIBRA", "CogDrisk")),
- pop = recode(pop, "Black" = "AA", "Hispanic" = "LA", "NHW" = "NHW", "all" = "all"),
- pop = factor(pop, levels = c("NHW", "LA", "AA", "all")),
- sig_fdr = factor(sig_fdr, levels = c(TRUE, FALSE))
- ),
- aes(x = outcome, y = or, color = pop, alpha = sig_fdr)) +
- geom_point(aes(group = interaction(term, pop)),
- position = position_dodge(width = 0.6), size = 1.5) +
- geom_errorbar(aes(ymin = lci, ymax = uci, group = interaction(term, pop)),
- position = position_dodge(width = 0.6), width = 0, size = 0.8) +
- geom_hline(yintercept = 1, linetype = 2) +
- scale_alpha_manual(values = c(`TRUE` = 1, `FALSE` = 0.1)) +
- scale_color_manual(values = color) +
- labs(x = "", y = "OR (95% CI)", color = "Population", alpha = "FDR p < 0.05") +
- facet_wrap(~term, nrow = 1) +
- theme_bw() +
- theme(
- axis.text.x = element_text(size = 6, angle = 0, hjust = 0.5),
- axis.text.y = element_text(size = 8),
- axis.title = element_text(size = 8),
- plot.title = element_text(size = 8, hjust = 0.5),
- legend.position = "bottom",
- strip.background = element_blank(),
- strip.text = element_text(face = "bold", size = 10)
- )
- plot_all = res_crs %>%
- filter(Parameter %in% c("mcaide", "whicap", "libra", "cogd"),
- category %in% c("Neuroimaging", "Plasma \nBiomarkers", "Cognitive \nFunction")) %>%
- filter(lab != "Aβ42", lab != "Aβ40") %>%
- mutate(
- pop = recode(pop, "Black" = "AA", "Hispanic" = "LA", "NHW" = "NHW", "all" = "all"),
- pop = factor(pop, levels = c("NHW", "LA", "AA", "all")),
- sig_fdr = factor(sig_fdr, levels = c(TRUE, FALSE)),
- Parameter = recode(Parameter,
- "mcaide" = "mCAIDE",
- "whicap" = "WHICAP",
- "libra" = "LIBRA",
- "cogd" = "CogDRisk"),
- Parameter = factor(Parameter, levels = c(
- "mCAIDE", "WHICAP", "LIBRA", "CogDRisk")),
- category = recode(category,
- "Neuroimaging" = "Neuroimaging",
- "Plasma \nBiomarkers" = "Plasma Biomarkers",
- "Cognitive \nFunction" = "Cognitive Function"),
- lab = recode(lab, "Hippo. \nVolume" = "Hippocampal \nVolume",
- "WMH" = "White Matter \nHyperintensity"),
- lab = factor(lab, levels = c(
- "MMSE", "CDR", "Memory", "Verbal\n Ability", "Executive\n Function",
- "Hippocampal \nVolume", "Cortical \nThickness",
- "NfL", "Total Tau", "pTau", "Aβ42/Aβ40"))) %>%
- ggplot(aes(x = lab, y = Std_Coefficient, color = pop, alpha = sig_fdr)) +
- geom_hline(yintercept = 0, linetype = 2) +
- geom_point(position = position_dodge(width = 0.6), size = 1.5) +
- geom_errorbar(aes(ymin = CI_low, ymax = CI_high),
- position = position_dodge(width = 0.6), width = 0, size = 0.8) +
- facet_grid(Parameter ~ category, scales = "free", space = "free_x") +
- scale_color_manual(values = color) +
- scale_alpha_manual(values = c(`TRUE` = 1, `FALSE` = 0.3)) +
- #scale_y_continuous(limits = c(-0.52, 0.48), breaks = seq(-0.5, 0.5, 0.25)) +
- labs(
- x = "",
- y = "Beta (95% CI)",
- color = "Population",
- alpha = "FDR p < 0.05"
- ) +
- theme_bw() +
- theme(
- axis.text.x = element_text(size = 8, angle = 45, hjust = 1),
- axis.text.y = element_text(size = 8),
- axis.title = element_text(size = 8),
- strip.background = element_blank(),
- strip.text = element_text(face = "bold", size = 10),
- legend.text = element_text(size = 10),
- legend.title = element_text(size = 10),
- legend.position = "bottom")
- ```
- ### AUC + R2
- ```{r}
- adjust_crs = function(df_models, pop_label = NULL) {
- df_data = if (!is.null(pop_label)) data %>% filter(pop == pop_label) else data
- df_models %>%
- mutate(
- pop = ifelse(is.null(pop_label), "ALL", pop_label),
- eq_crs_only = case_when(
- model %in% c("base", "base_noapoe") ~ eq,
- TRUE ~ str_replace(eq, "apoe \\+ ", "")
- ),
- res_crs_only = map(eq_crs_only, ~ glm(.x, data = df_data, family = binomial)),
- auc_crs_only = map_dbl(res_crs_only, ~ {
- y = model.response(model.frame(.x))
- p = predict(.x, type = "response")
- if (length(unique(y)) > 1) pROC::auc(pROC::roc(y, p)) else NA_real_
- }),
- nagelkerker2_crs_only = map_dbl(res_crs_only, ~ {
- if (length(unique(model.response(model.frame(.x)))) > 1)
- pscl::pR2(.x)[["McFadden"]]
- else NA_real_
- })
- )
- }
- afr_cdx_prs2 = adjust_crs(afr_cdx_prs, pop_label = "AFR") %>% mutate(pop = "Black")
- amr_cdx_prs2 = adjust_crs(amr_cdx_prs, pop_label = "AMR") %>% mutate(pop = "Hispanic")
- eur_cdx_prs2 = adjust_crs(eur_cdx_prs, pop_label = "EUR") %>% mutate(pop = "NHW")
- all_cdx_prs2 = adjust_crs(all_cdx_prs) %>% mutate(pop = "all")
- all_comb_cdx2 = bind_rows(all_cdx_prs2, afr_cdx_prs2, amr_cdx_prs2, eur_cdx_prs2)
- plot_roc_outcome = function(df, outcome_name, crs_type = "CRS", pop_filter = NULL) {
- crs_colors = c(
- "Demographics+APOE" = "#7A3900",
- "Demographics" = "#7A1100",
- "mCAIDE" = "#003DE6",
- "mCAIDE-" = "#003DE6",
- "WHICAP" = "#d95f02",
- "WHICAP-" = "#d95f02",
- "LIBRA" = "#F22424",
- "LIBRA-" = "#F22424",
- "CogDRisk" = "#005713",
- "CogDRisk-" = "#005713"
- )
- df_out = df %>% filter(outcome == outcome_name)
- if (!is.null(pop_filter)) df_out = df_out %>% filter(pop == pop_filter)
- df_out = df_out %>%
- mutate(
- outcome = recode(outcome,
- "cdx_mci_vs_cn" = "MCI",
- "cdx_dem_vs_cn" = "Dementia",
- "cdx_ci_vs_cn" = "MCI + Dementia"),
- model = recode(model,
- "base" = "Demographics+APOE",
- "base_noapoe" = "Demographics",
- "libra" = "LIBRA",
- "mcaide" = "mCAIDE",
- "whicap" = "WHICAP",
- "cogd" = "CogDRisk",
- "libra_sva" = "LIBRA-",
- "mcaide_sva" = "mCAIDE-",
- "whicap_sva" = "WHICAP-",
- "cogd_sva" = "CogDRisk-")) %>%
- mutate(model = factor(model, levels = c(
- "CogDRisk", "LIBRA", "WHICAP", "mCAIDE", "Demographics", "Demographics+APOE",
- "mCAIDE-", "WHICAP-", "LIBRA-", "CogDRisk-")))
- if (crs_type == "CRS") {
- df_out = df_out %>% filter(!grepl("-$", model) | model %in% c("Demographics+APOE", "Demographics"))
- } else if (crs_type == "CRS-") {
- df_out = df_out %>% filter(grepl("-$", model) | model %in% c("Demographics+APOE", "Demographics"))
- }
- desired_order = c(
- "CogDRisk", "LIBRA", "WHICAP", "mCAIDE", "Demographics", "Demographics+APOE")
- df_out$model = factor(df_out$model, levels = desired_order)
- # compute ROC curves
- df_out = df_out %>%
- mutate(
- roc_obj = map(res_crs_only, ~ {
- y = model.response(model.frame(.x))
- p = predict(.x, type = "response")
- if (length(unique(y)) > 1) pROC::roc(y, p) else NULL
- }),
- auc_val = map_dbl(roc_obj, ~ if (!is.null(.x)) as.numeric(pROC::auc(.x)) else NA_real_),
- auc_label = paste0(model, ": AUC = ", round(auc_val, 2)),
- roc_df = map(roc_obj, ~ if (!is.null(.x)) tibble(fpr = 1 - .x$specificities,
- tpr = .x$sensitivities) else NULL)
- )
- roc_plot_df = df_out %>%
- select(model, auc_val, auc_label, roc_df) %>%
- tidyr::unnest(roc_df)
- format_r2 = function(x) {
- ifelse(x < 0.01, formatC(x, format = "f", digits = 4), formatC(x, format = "f", digits = 3))
- }
- auc_labels_df = df_out %>%
- select(model, auc_val, nagelkerker2_crs_only) %>%
- distinct(model, auc_val, nagelkerker2_crs_only) %>%
- arrange(factor(model, levels = desired_order)) %>%
- mutate(
- auc_label = paste0(model, ": ", round(auc_val, 2),
- "; ", format_r2(nagelkerker2_crs_only)),
- fpr = 0.98, tpr = 0.02 + 0.05 * (row_number())
- )
- ggplot(roc_plot_df, aes(x = fpr, y = tpr, color = model)) +
- geom_line(size = 0.5) +
- geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "gray50") +
- geom_text(
- data = auc_labels_df,
- aes(x = fpr, y = tpr, label = auc_label),
- inherit.aes = FALSE, hjust = 1, vjust = 0, size = 2
- ) +
- scale_color_manual(values = crs_colors[levels(df_out$model)]) +
- labs(x = "False Positive Rate",
- y = "True Positive Rate",
- color = NULL,
- title = unique(df_out$outcome)) +
- theme_bw() +
- theme(
- axis.title = element_text(size = 6),
- legend.position = "none",
- plot.title = element_text(hjust = 0.5, size = 8, face = "bold")
- )
- }
- #MCI
- roc_mci_all = plot_roc_outcome(all_comb_cdx2, "cdx_mci_vs_cn", crs_type = "CRS", pop_filter = "all")
- roc_mci_aa = plot_roc_outcome(all_comb_cdx2, "cdx_mci_vs_cn", crs_type = "CRS", pop_filter = "Black")
- roc_mci_la = plot_roc_outcome(all_comb_cdx2, "cdx_mci_vs_cn", crs_type = "CRS", pop_filter = "Hispanic")
- roc_mci_nhw = plot_roc_outcome(all_comb_cdx2, "cdx_mci_vs_cn", crs_type = "CRS", pop_filter = "NHW")
- #Dementia
- roc_dem_all = plot_roc_outcome(all_comb_cdx2, "cdx_dem_vs_cn", crs_type = "CRS", pop_filter = "all")
- roc_dem_aa = plot_roc_outcome(all_comb_cdx2, "cdx_dem_vs_cn", crs_type = "CRS", pop_filter = "Black")
- roc_dem_la = plot_roc_outcome(all_comb_cdx2, "cdx_dem_vs_cn", crs_type = "CRS", pop_filter = "Hispanic")
- roc_dem_nhw = plot_roc_outcome(all_comb_cdx2, "cdx_dem_vs_cn", crs_type = "CRS", pop_filter = "NHW")
- #MCI+Dementia
- roc_ci_all = plot_roc_outcome(all_comb_cdx2, "cdx_ci_vs_cn", crs_type = "CRS", pop_filter = "all")
- roc_ci_aa = plot_roc_outcome(all_comb_cdx2, "cdx_ci_vs_cn", crs_type = "CRS", pop_filter = "Black")
- roc_ci_la = plot_roc_outcome(all_comb_cdx2, "cdx_ci_vs_cn", crs_type = "CRS", pop_filter = "Hispanic")
- roc_ci_nhw = plot_roc_outcome(all_comb_cdx2, "cdx_ci_vs_cn", crs_type = "CRS", pop_filter = "NHW")
- shared_legend = get_legend(
- roc_mci_all +
- theme(
- legend.position = "bottom",
- legend.title = element_text(size = 8, face = "bold"),
- legend.text = element_text(size = 6)) +
- guides(color = guide_legend(nrow = 1)))
- pageCreate(width = 9, height = 12.5, default.units = "inches")
- plotGG(
- plot = roc_mci_all,
- x = 0, y = 0, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotText(
- label = "A)", x = 0.1, y = 0.1,
- just = c("left", "top"), fontface = "bold",
- fontsize = 12, default.units = "inches"
- )
- plotGG(
- plot = roc_dem_all,
- x = 3, y = 0, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_ci_all,
- x = 6, y = 0, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_mci_aa,
- x = 0, y = 3, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotText(
- label = "B)", x = 0.1, y = 3.1,
- just = c("left", "top"), fontface = "bold",
- fontsize = 12, default.units = "inches"
- )
- plotGG(
- plot = roc_dem_aa,
- x = 3, y = 3, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_ci_aa,
- x = 6, y = 3, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_mci_la,
- x = 0, y = 6, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotText(
- label = "C)", x = 0.1, y = 6.1,
- just = c("left", "top"), fontface = "bold",
- fontsize = 12, default.units = "inches"
- )
- plotGG(
- plot = roc_dem_la,
- x = 3, y = 6, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_ci_la,
- x = 6, y = 6, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_mci_nhw,
- x = 0, y = 9, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotText(
- label = "D)", x = 0.1, y = 9.1,
- just = c("left", "top"), fontface = "bold",
- fontsize = 12, default.units = "inches"
- )
- plotGG(
- plot = roc_dem_nhw,
- x = 3, y = 9, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- plot = roc_ci_nhw,
- x = 6, y = 9, width = 3, height = 3,
- just = c("left", "top"), default.units = "inches"
- )
- plotGG(
- shared_legend,
- x = 2, y = 12, width = 6, height = 0.5,
- just = c("left", "top")
- )
- pageGuideHide()
- ```
- ```{r}
- # publication table for AUC & R2 for linear and logistic regression
- adjust_crs_linear = function(df_models, pop_label = NULL) {
- df_data = if (!is.null(pop_label)) data %>% filter(pop == pop_label) else data
- df_models %>%
- mutate(
- pop = ifelse(is.null(pop_label), "ALL", pop_label),
- eq_crs_only = case_when(
- model %in% c("base", "base_noapoe") ~ eq,
- TRUE ~ str_replace(eq, "apoe \\+ ", "")
- ),
- res_crs_only = map(eq_crs_only, ~ lm(as.formula(.x), data = df_data)),
- r2_crs_only = map_dbl(res_crs_only, ~ {
- summ <- summary(.x)
- if (!is.null(summ$r.squared)) summ$r.squared else NA_real_
- })
- )
- }
- afr_num_prs2 = adjust_crs_linear(afr_num_prs, pop_label = "AFR") %>% mutate(pop = "Black")
- amr_num_prs2 = adjust_crs_linear(amr_num_prs, pop_label = "AMR") %>% mutate(pop = "Hispanic")
- eur_num_prs2 = adjust_crs_linear(eur_num_prs, pop_label = "EUR") %>% mutate(pop = "NHW")
- all_num_prs2 = adjust_crs_linear(all_num_prs) %>% mutate(pop = "all")
- all_comb_num2 = bind_rows(all_num_prs2, afr_num_prs2, amr_num_prs2, eur_num_prs2)
- res_pfm = bind_rows(
- select(all_comb_cdx2, model, pop, outcome, auc_crs_only, nagelkerker2_crs_only),
- select(all_comb_num2, model, pop, outcome, r2_crs_only)) %>%
- filter(model %in% c("base", "base_noapoe", "cogd", "libra", "whicap", "mcaide", "cogd_sva", "libra_sva", "whicap_sva", "mcaide_sva")) %>%
- filter(!outcome %in% c("cdx_hypertension", "cdx_dyslipidemia", "cdx_diabetes", "bmi", "cdx_anxiety", "cdx_depression", "cdx_cvd", "wmh_volume_log",
- "ab40", "ab42", "cdx_cn_vs_ci")) %>%
- arrange(pop, model) %>%
- mutate(
- model = recode(model,
- "base_noapoe" = "Demographics",
- "base" = "Demographics + APOE",
- "cogd" = "CogDRisk",
- "libra" = "LIBRA",
- "whicap" = "WHICAP",
- "mcaide" = "mCAIDE",
- "cogd_sva" = "CogDRisk (sensitivity)",
- "libra_sva" = "LIBRA (sensitivity)",
- "whicap_sva" = "WHICAP (sensitivity)",
- "mcaide_sva" = "mCAIDE (sensitivity)"),
- category = case_when(
- outcome %in% c("va", "em", "ef", "mmse_total", "cdr") ~ "Cognitive \nFunction",
- outcome %in% c("tau", "ptau", "nfl", "ab42_ab40") ~ "Plasma \nBiomarkers",
- outcome %in% c("meta_roi", "z_hippcampul_vol") ~ "Neuroimaging",
- outcome %in% c("cdx_mci_vs_cn", "cdx_dem_vs_cn", "cdx_ci_vs_cn") ~ "Medical \nHistory"),
- lab = fct_recode(
- outcome,
- MMSE = "mmse_total",
- CDR = "cdr",
- "Executive\n Function" = "ef",
- "Verbal\n Ability" = "va",
- Memory = "em",
- "Cortical \nThickness" = "meta_roi",
- "Hippo. \nVolume" = "z_hippcampul_vol",
- "Aβ42/Aβ40" = "ab42_ab40",
- "Total Tau" = "tau",
- "pTau" = "ptau",
- NfL = "nfl",
- MCI = "cdx_mci_vs_cn",
- Dementia = "cdx_dem_vs_cn",
- "Cog. Impair." = "cdx_ci_vs_cn"),
- lab = fct_inorder(lab)
- ) %>%
- rename(
- Model = model,
- Race = pop,
- Outcome = lab,
- Category = category,
- AUC = auc_crs_only,
- `Nagelkerke R2` = nagelkerker2_crs_only,
- R2 = r2_crs_only
- ) %>%
- select(-outcome) %>%
- select(Model, Race, Outcome, Category, AUC, `Nagelkerke R2`, R2)
- ```
- ### Demographics
- ```{r}
- # table 1
- summary_df = data %>%
- filter(!is.na(cdx_cog)) %>%
- group_by(cdx_cog) %>%
- summarise(
- Total = n(),
- Age = sprintf("%.1f (± %.1f)", mean(age, na.rm = TRUE), sd(age, na.rm = TRUE)),
- Female = sprintf("%d (%.1f%%)", sum(sex == 1, na.rm = TRUE), 100 * mean(sex == 1, na.rm = TRUE)),
- Male = sprintf("%d (%.1f%%)", sum(sex == 0, na.rm = TRUE), 100 * mean(sex == 0, na.rm = TRUE)),
- `ε4 Carrier` = sprintf("%d (%.1f%%)", sum(apoe4 == 1, na.rm = TRUE), 100 * mean(apoe4 == 1, na.rm = TRUE)),
- `ε4 Noncarrier` = sprintf("%d (%.1f%%)", sum(apoe4 == 0, na.rm = TRUE), 100 * mean(apoe4 == 0, na.rm = TRUE)),
- mCAIDE = sprintf("%.3f (± %.2f)", mean(mcaide, na.rm = TRUE), sd(mcaide, na.rm = TRUE)),
- WHICAP = sprintf("%.3f (± %.2f)", mean(whicap, na.rm = TRUE), sd(whicap, na.rm = TRUE)),
- LIBRA = sprintf("%.3f (± %.2f)", mean(libra, na.rm = TRUE), sd(libra, na.rm = TRUE)),
- CogDRisk = sprintf("%.3f (± %.2f)", mean(cogd, na.rm = TRUE), sd(cogd, na.rm = TRUE)),
- MMSE = sprintf("%.2f (± %.2f)", mean(mmse_total, na.rm = TRUE), sd(mmse_total, na.rm = TRUE)),
- CDR = sprintf("%.4f (± %.2f)", mean(cdr, na.rm = TRUE), sd(cdr, na.rm = TRUE)),
- `Executive\n Function` = sprintf("%.2f (± %.2f)", mean(ef, na.rm = TRUE), sd(ef, na.rm = TRUE)),
- `Verbal\n Ability` = sprintf("%.2f (± %.2f)", mean(va, na.rm = TRUE), sd(va, na.rm = TRUE)),
- Memory = sprintf("%.2f (± %.2f)", mean(em, na.rm = TRUE), sd(em, na.rm = TRUE)),
- `Cortical \nThickness` = sprintf("%.2f (± %.2f)", mean(meta_roi, na.rm = TRUE), sd(meta_roi, na.rm = TRUE)),
- `Hippo. \nVolume` = sprintf("%.2f (± %.2f)", mean(z_hippcampul_vol, na.rm = TRUE), sd(z_hippcampul_vol, na.rm = TRUE)),
- `Aβ42/Aβ40` = sprintf("%.3f (± %.2f)", mean(ab42_ab40, na.rm = TRUE), sd(ab42_ab40, na.rm = TRUE)),
- `Total Tau` = sprintf("%.3f (± %.2f)", mean(tau, na.rm = TRUE), sd(tau, na.rm = TRUE)),
- pTau = sprintf("%.2f (± %.2f)", mean(ptau, na.rm = TRUE), sd(ptau, na.rm = TRUE)),
- NfL = sprintf("%.3f (± %.2f)", mean(nfl, na.rm = TRUE), sd(nfl, na.rm = TRUE))
- ) %>%
- tibble::column_to_rownames("cdx_cog") %>%
- t() %>%
- as.data.frame() %>%
- tibble::rownames_to_column("Variable")
- # racial breakdown rows
- race_summary = data %>%
- filter(!is.na(cdx_cog), race %in% c("NHW", "Hispanic", "Black")) %>%
- group_by(cdx_cog, race) %>%
- summarise(n = n(), .groups = "drop_last") %>%
- mutate(
- perc = round(100 * n / sum(n), 1),
- value = sprintf("%d (%.1f%%)", n, perc)
- ) %>%
- select(cdx_cog, Variable = race, value) %>%
- tidyr::pivot_wider(names_from = cdx_cog, values_from = value)
- summary_df = bind_rows(summary_df, race_summary)
- summary_df = summary_df %>%
- mutate(
- Group = case_when(
- Variable %in% c("Total", "Case", "Control") ~ "AD",
- Variable == "Age" ~ "Age",
- Variable %in% c("Female", "Male") ~ "Sex",
- Variable %in% c("NHW", "Hispanic", "Black") ~ "Race",
- Variable %in% c("ε4 Carrier", "ε4 Noncarrier") ~ "APOE",
- Variable %in% c("mCAIDE", "WHICAP", "LIBRA", "CogDRisk") ~ "CRS",
- Variable %in% c("MMSE", "CDR", "Executive\n Function", "Verbal\n Ability", "Memory") ~ "Cognition",
- Variable %in% c("Cortical \nThickness", "Hippo. \nVolume") ~ "Imaging",
- Variable %in% c("Aβ40", "Aβ42", "Aβ42/Aβ40", "Total Tau", "pTau", "NfL") ~ "Biomarker",
- TRUE ~ NA_character_
- )) %>%
- rename(
- Characteristics = Variable,
- `Cognitively Normal` = "0",
- `Mild Cognitive Impairment` = "1",
- Dementia = "2"
- ) %>%
- select(-Group)
- ```
crs_analysis.qmd at commit aea67ca, under MIT · at the source
Overview
- Edward and Pearl Fein Memory and Aging Center, University of California, San Francisco, San Francisco, California, USA
- Department of Psychiatry and Behavioural Sciences, University of California, San Francisco, San Francisco, California, USA
- Department of Neurology and Weill Institute for Neurosciences, University of California, San Francisco, San Francisco, California, USA
- Department of Epidemiology and Biostatistics, University of California, San Francisco, San Francisco, California, USA
- San Francisco Veterans Affairs Health Care System, San Francisco, California, USA
- Department of Radiology and Biomedical Imaging, University of California, San Francisco, San Francisco, California, USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 13 matches between paragraphs and lines of code.
AndrewsLabUCSF/CRS-analysis
aea67caca4b114ff2aa32bb4bf5d244127574e7b, 25 March 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
6 files
- workflow/
scripts/ , Quarto, 2,407 lines, 7 matchescrs_analysis.qmd - workflow/
scripts/ , Quarto, 471 lines, 3 matchescrs_standardization.qmd - workflow/
scripts/ , Quarto, 401 lines, 1 matchcutoff_analysis.qmd - workflow/
scripts/ , Quarto, 472 lines, 2 matchesimputation.qmd - LICENSE, License, 21 lines
- README.md, Text, 154 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: AndrewsLabUCSF/
CRS-analysis
Read it in the paper: doi.org/10.1002/alz.71567.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 4 scripts, each with its path and the digest of its content;
- 13 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 5 keywords, 13 MeSH terms, 14 funders, 51 references.
Cite
This paper
Okorie, M., Jiang, X., Yaffe, K., Yokoyama, J. S., Andrews, S. J., & for the Health and Aging Brain Study–Health Disparities. (2026). Associations of dementia polyexposure scores to Alzheimer's disease endophenotypes in a diverse population. Alzheimer's & dementia : the journal of the Alzheimer's Association, 22(8), e71567. https://
BibTeX
@article{okorie2026assoc
author = {Okorie, Meri and Jiang, Xiaqing and Yaffe, Kristine and Yokoyama, Jennifer S and Andrews, Shea J and {for the Health and Aging Brain Study–Health Disparities}},
title = {{Associations of dementia polyexposure scores to Alzheimer's disease endophenotypes in a diverse population}},
journal = {Alzheimer's \& dementia : the journal of the Alzheimer's Association},
year = {2026},
month = aug,
volume = {22},
number = {8},
pages = {e71567},
publisher = {Wiley},
issn = {1552-5260},
doi = {10.1002/
url = {https://
pmid = {42522069},
pmcid = {PMC13415752}
}
RIS
TY - JOUR
AU - Okorie, Meri
AU - Jiang, Xiaqing
AU - Yaffe, Kristine
AU - Yokoyama, Jennifer S
AU - Andrews, Shea J
AU - for the Health and Aging Brain Study–Health Disparities
TI - Associations of dementia polyexposure scores to Alzheimer's disease endophenotypes in a diverse population
T2 - Alzheimer's & dementia : the journal of the Alzheimer's Association
J2 - Alzheimers Dement
PY - 2026
DA - 2026/
VL - 22
IS - 8
SP - e71567
SN - 1552-5260
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Associations of dementia polyexposure scores to Alzheimer's disease endophenotypes in a diverse population",
"container-title": "Alzheimer's & dementia : the journal of the Alzheimer's Association",
"author": [
{
"family": "Okorie",
"given": "Meri"
},
{
"family": "Jiang",
"given": "Xiaqing"
},
{
"family": "Yaffe",
"given": "Kristine"
},
{
"family": "Yokoyama",
"given": "Jennifer S"
},
{
"family": "Andrews",
"given": "Shea J"
},
{
"literal": "for the Health and Aging Brain Study–Health Disparities"
}
],
"container-title-short":
"volume": "22",
"issue": "8",
"page": "e71567",
"DOI": "10.1002/
"PMID": "42522069",
"PMCID": "PMC13415752",
"ISSN": "1552-5260",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41593-026-02363-4 [code]
- Cortical thickness changes precede high levels of amyloid by at least 7 years.Journal: Nature neuroscienceIn common: easystats, broom, cowplot, 4 other tools, PET / SPECT, Alzheimer's / dementia, 4 references
- [2] doi:10.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: randomForest, pROC, broom, 5 other tools
- [3] doi:10.1093/braincomms/fcag236 [code]
- Dynamic, state-dependent characteristics of cognitive fluctuations in Lewy body dementia: a magnetoencephalography study.Journal: Brain communicationsIn common: randomForest, pROC, easystats, 4 other tools, Alzheimer's / dementia
- [4] doi:10.3390/ijms27156925 [code]
- XGBoost-SHAP Interpretable Modeling Identifies and Validates an Eight-Gene Biomarker for Hepatic Encephalopathy Risk Prediction in Cirrhosis.Journal: International journal of molecular sciencesIn common: randomForest, pROC, cowplot, 4 other tools
- [5] doi:10.7717/peerj.21426 [code]
- Integrated transcriptomic identification and validation reveal key autophagy-associated biomarkers in sleep deprivation.Journal: PeerJIn common: randomForest, pROC, cowplot, 4 other tools
- [6] doi:10.1093/neuonc/noag128 [code]
- Spatially-resolved single-cell imaging of melanoma brain metastases identifies localized immune patterns predictive of immune checkpoint blockade response.Journal: Neuro-oncologyIn common: pROC, easystats, cowplot, 4 other tools, clinical / translational
- [7] doi:10.1016/j.isci.2026.115657 [code]
- Integration of machine learning to develop a disulfidptosis model for predicting glioma prognosis, immunotherapy response, and drug.Journal: iScienceIn common: pROC, broom, cowplot, 4 other tools, clinical / translational
- [8] doi:10.1126/sciadv.aec9291 [code]
- Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.Journal: Science advancesIn common: pROC, easystats, broom, 4 other tools
- [9] doi:10.1038/s41467-026-77170-3 [code]
- DNA methylation profiling identifies long-range epigenetic silencing of clustered protocadherins as a key determinant of meningioma progression.Journal: Nature communicationsIn common: randomForest, pROC, broom, 3 other tools
- [10] doi:10.1073/pnas.2606871123 [code]
- Oxytocin modulates the neurocomputational mechanisms engaged in learning rank relationships in social networks.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: easystats, broom, cowplot, 4 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 4 scripts, and 13 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:a48dec3284918f03…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
