Cardiometabolic medication exposures and cognitive outcomes in Alzheimer's disease.
The 5 matches
- [1] § Methods › Statistical models ↔ code/Forest_plots_CDR(cognitive).Rmd, lines 498–552 · score 0.75 · Dem progressors, ADem, clinical progression, MCI progressors, parallel, tracks
- [2] § Methods › Study design ↔ code/preprocessed_HABSHD.ipynb, lines 39–48 · score 0.75 · thyroid disease, high cholesterol, anxiety, depression, stroke, hypertension
- [3] § Methods › Study design ↔ code/preprocessed_NACC.ipynb, lines 50–59 · score 0.67 · high cholesterol, anxiety, depression, stroke, thyroid, hypertension
- [4] § Methods › Statistical models ↔ code/Forest_plots_CDR(cognitive).Rmd, lines 498–552 · score 0.60 · ADem, clinical progression, MCI progression, stratified, backgrounds, Cognitive
- [5] § Methods › Statistical models ↔ code/Forest_plots_CDR(baseline cognitive).Rmd, lines 317–369 · score 0.52 · ADem, parallel, tracks, Diamond, blocks, forest
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
R Markdown · 553 lines · 19 KB · no license · 2 matches
- ---
- title: "Forest Plots - Cognitive Progression Groups"
- author: "Yihan Wang"
- date: "2025-09-16"
- output:
- word_document: default
- pdf_document: default
- ---
- 1. PROGRESSION GROUPS (4 groups):
- Groups included:
- - Non-progression (CU stable + MCI stable combined)
- - CU-MCI progression (progression from CU to MCI)
- - CU/MCI-AD progression (progression to AD dementia)
- - AD (dementia patients)
- 2. COMORBIDITY ADJUSTMENTS:
- Added to ALL models as covariates:
- - CVD (Cardiovascular disease)
- - Endocrine (Endocrine disorders including diabetes)
- - Psychiatric (Psychiatric conditions)
- 3. MEDICATION × TIME INTERACTIONS:
- All 7 medications include interaction with year_since_baseline:
- - ACEi × Time, ARB × Time, β-Blocker × Time, CCB × Time
- - Diuretic × Time, Metformin × Time, Statin × Time
- This allows assessment of whether medication effects change over follow-up period.
- 4. MODEL FORMULA STRUCTURE:
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- drug:year_since_baseline (for all 7 drugs) +
- (1 + year_since_baseline | id)
- ```{r}
- rm(list=ls())
- library(missRanger)
- library(dplyr)
- library(lubridate)
- library(lme4) # mixed models
- library(lmerTest) # p-values for lmer
- library(splines)
- library(conflicted)
- library(broom.mixed)
- library(dplyr)
- library(stringr)
- library(forcats)
- library(ggplot2)
- library(forestploter)
- library(grid)
- library(gridtext)
- conflicts_prefer(dplyr::lag)
- conflicts_prefer(lmerTest::lmer)
- conflicts_prefer(dplyr::filter)
- ```
- ```{r}
- source("medication-lmer-utility.R")
- source("plots.R")
- ```
- ```{r}
- NACC_full_df_cdr<-read.csv("../preprocessed_data/NACC/NACC_cdr_imputed_binary.csv")
- AIBL_full_df_cdr<-read.csv("../preprocessed_data/AIBL/AIBL_cdr_imputed_binary.csv")
- HABS_full_df_cdr<-read.csv("../preprocessed_data/HABSHD/HABSHD_cdr_imputed_binary.csv")
- NACC_full_df_cdr$edu <- scale(NACC_full_df_cdr$edu)
- NACC_full_df_cdr$age <- scale(NACC_full_df_cdr$age)
- AIBL_full_df_cdr$edu <- scale(AIBL_full_df_cdr$edu)
- AIBL_full_df_cdr$age <- scale(AIBL_full_df_cdr$age)
- HABS_full_df_cdr$edu <- scale(HABS_full_df_cdr$edu)
- HABS_full_df_cdr$age <- scale(HABS_full_df_cdr$age)
- ```
- ```{r}
- # Split by progression groups
- NACC_split <- split_by_progression(NACC_full_df_cdr, id_col = "id", visit_col = "visit_no", status_col = "status")
- AIBL_split <- split_by_progression(AIBL_full_df_cdr, id_col = "id", visit_col = "visit_no", status_col = "status")
- HABS_split <- split_by_progression(HABS_full_df_cdr, id_col = "id", visit_col = "visit_no", status_col = "status")
- # Extract groups (function now directly returns the 4 groups we need)
- # Non-progression (stable CU + stable MCI combined by the function)
- NACC_non_prog = NACC_split$groups$Non_progression
- AIBL_non_prog = AIBL_split$groups$Non_progression
- HABS_non_prog = HABS_split$groups$Non_progression
- # CU-MCI progression
- NACC_cu_mci_prog = NACC_split$groups$CU_MCI_progression
- AIBL_cu_mci_prog = AIBL_split$groups$CU_MCI_progression
- HABS_cu_mci_prog = HABS_split$groups$CU_MCI_progression
- # CU/MCI-AD progression
- NACC_to_ad_prog = NACC_split$groups$CU_MCI_AD_progression
- AIBL_to_ad_prog = AIBL_split$groups$CU_MCI_AD_progression
- HABS_to_ad_prog = HABS_split$groups$CU_MCI_AD_progression
- # AD
- NACC_ad = NACC_split$groups$AD_stable
- AIBL_ad = AIBL_split$groups$AD_stable
- HABS_ad = HABS_split$groups$AD_stable
- ```
- # Full
- ```{r}
- NACC_full_df_cdr$visit_date <- as.Date(NACC_full_df_cdr$visit_date, format = "%Y-%m-%d")
- fit_full_NACC <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = NACC_full_df_cdr
- )
- summary(fit_full_NACC)
- ```
- ```{r}
- AIBL_full_df_cdr$visit_date <- as.Date(AIBL_full_df_cdr$visit_date, format = "%Y-%m-%d")
- fit_full_AIBL <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = AIBL_full_df_cdr
- )
- summary(fit_full_AIBL)
- ```
- ```{r}
- HABS_full_df_cdr$visit_date <- as.Date(HABS_full_df_cdr$visit_date, format = "%Y-%m-%d")
- fit_full_HABS <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = HABS_full_df_cdr
- )
- summary(fit_full_HABS)
- ```
- # Non-progression (CU + MCI stable combined)
- ```{r}
- NACC_non_prog$visit_date <- as.Date(NACC_non_prog$visit_date, format = "%Y-%m-%d")
- fit_NACC_NON_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = NACC_non_prog
- )
- summary(fit_NACC_NON_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_NACC_NON_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- AIBL_non_prog$visit_date <- as.Date(AIBL_non_prog$visit_date, format = "%Y-%m-%d")
- fit_AIBL_NON_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = AIBL_non_prog
- )
- summary(fit_AIBL_NON_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_AIBL_NON_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- HABS_non_prog$visit_date <- as.Date(HABS_non_prog$visit_date, format = "%Y-%m-%d")
- fit_HABS_NON_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = HABS_non_prog
- )
- summary(fit_HABS_NON_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_HABS_NON_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- # CU-MCI Progression
- ```{r}
- NACC_cu_mci_prog$visit_date <- as.Date(NACC_cu_mci_prog$visit_date, format = "%Y-%m-%d")
- fit_NACC_CU_MCI_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = NACC_cu_mci_prog
- )
- summary(fit_NACC_CU_MCI_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_NACC_CU_MCI_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- AIBL_cu_mci_prog$visit_date <- as.Date(AIBL_cu_mci_prog$visit_date, format = "%Y-%m-%d")
- fit_AIBL_CU_MCI_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = AIBL_cu_mci_prog
- )
- summary(fit_AIBL_CU_MCI_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_AIBL_CU_MCI_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- HABS_cu_mci_prog$visit_date <- as.Date(HABS_cu_mci_prog$visit_date, format = "%Y-%m-%d")
- fit_HABS_CU_MCI_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = HABS_cu_mci_prog
- )
- summary(fit_HABS_CU_MCI_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_HABS_CU_MCI_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- # CU/MCI-AD Progression
- ```{r}
- NACC_to_ad_prog$visit_date <- as.Date(NACC_to_ad_prog$visit_date, format = "%Y-%m-%d")
- fit_NACC_TO_AD_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = NACC_to_ad_prog
- )
- summary(fit_NACC_TO_AD_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_NACC_TO_AD_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- AIBL_to_ad_prog$visit_date <- as.Date(AIBL_to_ad_prog$visit_date, format = "%Y-%m-%d")
- fit_AIBL_TO_AD_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = AIBL_to_ad_prog
- )
- summary(fit_AIBL_TO_AD_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_AIBL_TO_AD_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- HABS_to_ad_prog$visit_date <- as.Date(HABS_to_ad_prog$visit_date, format = "%Y-%m-%d")
- fit_HABS_TO_AD_PROG <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = HABS_to_ad_prog
- )
- summary(fit_HABS_TO_AD_PROG)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_HABS_TO_AD_PROG))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- # AD
- ```{r}
- NACC_ad$visit_date <- as.Date(NACC_ad$visit_date, format = "%Y-%m-%d")
- fit_NACC_AD <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = NACC_ad
- )
- summary(fit_NACC_AD)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_NACC_AD))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- AIBL_ad$visit_date <- as.Date(AIBL_ad$visit_date, format = "%Y-%m-%d")
- fit_AIBL_AD <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = AIBL_ad
- )
- summary(fit_AIBL_AD)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_AIBL_AD))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- ```{r}
- HABS_ad$visit_date <- as.Date(HABS_ad$visit_date, format = "%Y-%m-%d")
- fit_HABS_AD <- lmer(
- CDR ~ year_since_baseline +
- age + sex + edu + APOE4 +
- CVD + Endocrine + Psychiatric +
- ACEi + ARB + BetaBlk + CCB + Diuretic + Metformin + Statin +
- ACEi:year_since_baseline + ARB:year_since_baseline + BetaBlk:year_since_baseline +
- CCB:year_since_baseline + Diuretic:year_since_baseline +
- Metformin:year_since_baseline + Statin:year_since_baseline +
- (1 + year_since_baseline | id),
- data = HABS_ad
- )
- summary(fit_HABS_AD)
- # BH-adjusted p-values
- coef_summary <- coef(summary(fit_HABS_AD))
- p_values <- coef_summary[, "Pr(>|t|)"]
- p_adjusted <- p.adjust(p_values, method = "BH")
- cat("nBH-adjusted p-values:n")
- print(data.frame(Term = rownames(coef_summary), P.value = p_values, P.adjusted = p_adjusted))
- ```
- # plots
- ```{r}
- terms_all <-c(
- "year_since_baseline","age","sex","edu","APOE4",
- "CVD", "Endocrine", "Psychiatric",
- "ACEi","ARB","BetaBlk","CCB",
- "Diuretic","Metformin", "Statin",
- "year_since_baseline:ACEi","year_since_baseline:ARB",
- "year_since_baseline:BetaBlk","year_since_baseline:CCB",
- "year_since_baseline:Diuretic", "year_since_baseline:Metformin",
- "year_since_baseline:Statin"
- )
- terms_rename <- c(
- "year_since_baseline"="Time",
- "age"="Age (baseline)",
- "sex"="Sex (ref: Male)",
- "edu"="Education (z-scored)",
- "APOE4"="APOE4 carrier (ref: No)",
- "CVD"="CVD",
- "Endocrine"="Endocrine disease",
- "Psychiatric"="Psychiatric disease",
- "ACEi"="ACEi",
- "ARB"="ARBs",
- "BetaBlk"="β-Blocker",
- "CCB"="CCBs",
- "Diuretic"="Diuretics",
- "Metformin"="Metformin",
- "Statin"="Statins",
- "year_since_baseline:ACEi"="ACEi × Time",
- "year_since_baseline:ARB"="ARBs × Time",
- "year_since_baseline:BetaBlk"="β-Blocker × Time",
- "year_since_baseline:CCB"="CCBs × Time",
- "year_since_baseline:Diuretic"="Diuretics × Time",
- "year_since_baseline:Metformin"="Metformin × Time",
- "year_since_baseline:Statin"="Statins × Time"
- )
- ```
- ```{r}
- dt_cog = make_dt_from_fits(
- fits = list(
- `Overall` = list(fit_full_NACC, fit_full_AIBL, fit_full_HABS),
- `Non-progression` = list(fit_NACC_NON_PROG, fit_AIBL_NON_PROG, fit_HABS_NON_PROG),
- `CU-MCI progression` = list(fit_NACC_CU_MCI_PROG, fit_AIBL_CU_MCI_PROG, fit_HABS_CU_MCI_PROG),
- `CU/MCI-ADem progression` = list(fit_NACC_TO_AD_PROG, fit_AIBL_TO_AD_PROG, fit_HABS_TO_AD_PROG),
- `ADem-stable` = list(fit_NACC_AD, fit_AIBL_AD, fit_HABS_AD)
- ),
- term= terms_all,
- cohorts = c("NACC","AIBL","HABS"),
- term_labels = terms_rename,
- method = "REML",
- digits = 3,
- p_adjust = "none"
- )
- ```
- ```{r}
- png_path <- "../plots/forestplot/Figure 2.png"
- dir.create(dirname(png_path), recursive = TRUE, showWarnings = FALSE)
- # Expanded width to 15 in for a wider landscape layout (5 parallel group tracks)
- img_w <- 15; img_h <- 10; img_dpi <- 500
- if (requireNamespace("ragg", quietly = TRUE)){
- ragg::agg_png(png_path, width = img_w, height = img_h,
- units = "in", res = img_dpi, background = "white")
- } else {
- png(png_path, width = img_w * img_dpi, height = img_h * img_dpi,
- res = img_dpi, bg = "white")
- }
- plot_forest_stratification_meta_expanded2(
- dt = dt_cog,
- terms = terms_all,
- term_labels = terms_rename,
- cohorts = c("NACC", "AIBL", "HABS"),
- interaction_only = TRUE, # Set to TRUE if you only want to plot the drug * time rows
- # Group tracking parameters for the 5 parallel blocks
- prog_groups = c("Overall", "Non-progression", "CU-MCI progression", "CU/MCI-ADem progression", "ADem-stable"),
- group_colors = c("#2F4F4F", "#BB9393", "#FEAD76", "#E64B35", "#756BB1"),
- # Custom x-axis window boundaries for each of your 5 clinical group columns
- xlim_cols = list(
- `Overall` = c(-0.05, 0.05),
- `Non-progression` = c(-0.025, 0.025),
- `CU-MCI progression` = c(-0.1, 0.2),
- `CU/MCI-AD progression` = c(-1, 1),
- `AD` = c(-1, 0.5)
- ),
- col_label_width = 0.08, # Space for left features/cohort labels
- forest_col_frac = 0.48, # 48% forest line graph / 52% text window ratio inside columns
- gap_feature = 0.60,
- sub_row_h = 0.55,
- cex_base = 0.90, # Sized perfectly for 5-column text spacing
- ci_lwd = 2.4,
- point_cex = 1.1,
- diamond_height = 0.38,
- # title = "Stratified Forest Plot – Cognitive Decline: Medication × Time Across Clinical Progression",
- title = " ",
- show_legend = TRUE,
- show_vline = TRUE,
- mar = c(6.5, 0.5, 5, 0.5) # Extended bottom cushion prevents legend clipping
- )
- dev.off()
- message("Saved: ", png_path)
- ```
Forest_plots_CDR(cognitive).Rmd at commit 81fba02, no license · at the source
Overview
- Department of Neuroscience, School of Translational Medicine, Monash University, 99 Commercial Rd., Melbourne, VIC 3004, Australia
- Australia BioCommons, The University of Melbourne, 21 Bedford Street, North Melbourne, Melbourne, VIC 3051, Australia
- The ARC Training Centre in Cognitive Computing for Medical Technologies, The University of Melbourne, 700 Swanston Street, Carlton, Melbourne, VIC 3053, Australia
- Alzheimer's Research Australia, The University of Western Australia, Nedlands, WA 6009, Australia
- School of Health and Biomedical Sciences, RMIT University, 30 Janefield Drive, Bundoora, Melbourne, VIC 3083, Australia
Abstract
Background: People with dementia are often prescribed cardiometabolic medications; however, the impact of this medication exposome on cognitive trajectories remains unclear.
Methods: We analysed data from National Alzheimer’s Coordinating Center (n = 28 044), Australian Imaging, Biomarkers and Lifestyle study (n = 1708) and Health and Aging Brain Study: Health Disparities (n = 1425) to examine associations between seven classes of cardiometabolic medications and cognitive outcomes [CDR sum of boxes (CDR-SB)], using linear mixed-effects models with time-varying exposure. Subgroup analyses were conducted by sex, apolipoprotein E (APOE) ε4, baseline age group and four progression groups [i.e. non-progression, cognitively unimpaired-to-mild cognitive impairment (CU-to-MCI), CU/
Results: Angiotensin-converting enzyme inhibitors and metformin were associated with a slower cognitive decline. Diuretics showed comparable associations, although these effects were restricted to specific subgroups. Statins exhibited divergent, stage-specific associations, with inverse associations observed in the CU/
Discussion: Future research should incorporate pharmacy-verified medication exposure, explicit dosing information and dynamically modelled trajectories, while routinely assessing baseline and follow-up cognitive outcomes in pharmacotherapy trials involving older adults.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
Sabrina-wyh/Multicohort-Medication-AD
81fba021b0f759d2fa0355d681c4850717e55aea, 28 July 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
17 files
- code/
Figure 1 (and eFigures).Rmd , R, 558 lines - code/
Figure S3(heatmap).Rmd , R, 154 lines - code/
FigureS2(medication_prop , R, 183 linesortion).Rmd - code/
FigureS4(medication_age_ , R, 118 linestrajectories_plots).Rmd - code/
Forest_plots_CDR(baselin , R, 371 lines, 1 matche cognitive).Rmd - code/
Forest_plots_CDR(cogniti , R, 553 lines, 2 matchesve).Rmd - code/
Forest_plots_CDR(main).R , R, 837 linesmd - code/
Tables.Rmd , R, 75 lines - code/
med_utils.py , Python, 1,402 lines - code/
medication-lmer-utility. , R, 1,340 linesR - code/
plots.R , R, 3,442 lines - code/
preprocessed_AIBL.ipynb , Jupyter, 393 lines - code/
preprocessed_HABSHD.ipyn , Jupyter, 391 lines, 1 matchb - code/
preprocessed_NACC.ipynb , Jupyter, 421 lines, 1 match - code/
preprocessing.Rmd , R, 139 lines - saved/
code/ , R, 2,071 linesplots.R - README.md, Text, 1 line
The paper's code and data availability statement is in the Data section.
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;
- 16 scripts, each with its path and the digest of its content;
- 5 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.
Data availability
Analyses and model development were conducted in R (version 4.3.1) and Python (version 3.11.11). Data requests should be made to NACC (radc.rush.edu), AIBL (https://
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
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, 6 keywords, 13 MeSH terms, 2 funders, 44 references.
Cite
This paper
Wang, Y., Goudey, B., Masters, C. L., Jin, L., Pan, Y., & The Health and Aging Brain Study (HABS-HD) Study Team. (2026). Cardiometabolic medication exposures and cognitive outcomes in Alzheimer's disease. Age and ageing, 55(9), afag263. https://
BibTeX
@article{wang2026cardiom
author = {Wang, Yihan and Goudey, Benjamin and Masters, Colin L and Jin, Liang and Pan, Yijun and {The Health and Aging Brain Study (HABS-HD) Study Team}},
title = {{Cardiometabolic medication exposures and cognitive outcomes in Alzheimer's disease}},
journal = {Age and ageing},
year = {2026},
month = sep,
volume = {55},
number = {9},
pages = {afag263},
publisher = {Oxford University Press},
issn = {0002-0729},
doi = {10.1093/
url = {https://
pmid = {42735389},
pmcid = {PMC13574286}
}
RIS
TY - JOUR
AU - Wang, Yihan
AU - Goudey, Benjamin
AU - Masters, Colin L
AU - Jin, Liang
AU - Pan, Yijun
AU - The Health and Aging Brain Study (HABS-HD) Study Team
TI - Cardiometabolic medication exposures and cognitive outcomes in Alzheimer's disease
T2 - Age and ageing
J2 - Age Ageing
PY - 2026
DA - 2026/
VL - 55
IS - 9
SP - afag263
SN - 0002-0729
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Cardiometabolic medication exposures and cognitive outcomes in Alzheimer's disease",
"container-title": "Age and ageing",
"author": [
{
"family": "Wang",
"given": "Yihan"
},
{
"family": "Goudey",
"given": "Benjamin"
},
{
"family": "Masters",
"given": "Colin L"
},
{
"family": "Jin",
"given": "Liang"
},
{
"family": "Pan",
"given": "Yijun"
},
{
"literal": "The Health and Aging Brain Study (HABS-HD) Study Team"
}
],
"container-title-short":
"volume": "55",
"issue": "9",
"page": "afag263",
"DOI": "10.1093/
"PMID": "42735389",
"PMCID": "PMC13574286",
"ISSN": "0002-0729",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
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/s41467-026-73865-9 [code]
- Histamine shapes the neurocomputational dynamics of human learning.Journal: Nature communicationsIn common: metafor, car, broom, 7 other tools
- [2] doi:10.1016/j.celrep.2026.117505 [code]
- Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.Journal: Cell reportsIn common: metafor, car, broom, 6 other tools, Alzheimer's / dementia
- [3] doi:10.1016/j.nicl.2026.104012 [code]
- Structural-functional multilayer brain network properties and outcome of combined repetitive transcranial magnetic stimulation and psychotherapy for obsessive-compulsive disorder.Journal: NeuroImage. ClinicalIn common: psych, car, lmerTest, 7 other tools
- [4] doi:10.34133/csbj.0042 [code]
- Using Steady-State Visual Evoked Potentials to Characterize Wide-Ranging Retinopathy Linked to &
lt;i& gt;CRB1& lt;/ i& gt;: Implications for Clinical Trials. Journal: Computational and structural biotechnology journalIn common: psych, car, lmerTest, 7 other tools - [5] doi:10.1162/imag.a.105 [code]
- Right posterior theta reflects human parahippocampal phase resetting by salient cues during goal-directed navigationJournal: n/aIn common: psych, car, lmerTest, 7 other tools
- [6] doi:10.64898/2026.03.09.710596 [code]
- Infant gut microbiomes contribute to metabolic states that impact brain functionJournal: bioRxiv (preprint)In common: car, broom, lmerTest, 6 other tools
- [7] doi:10.1038/s42003-026-10282-0 [code]
- Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife.Journal: Communications biologyIn common: psych, car, broom, 4 other tools, Alzheimer's / dementia
- [8] doi:10.1093/braincomms/fcag121 [code]
- Anterior insular co-activation patterns associated with stress markers in chronic primary pain.Journal: Brain communicationsIn common: psych, car, lmerTest, 6 other tools
- [9] doi:10.1073/pnas.2603114123 [code]
- The human hippocampus can pattern separate memories by meaning.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: psych, broom, lmerTest, 6 other tools
- [10] doi:10.1093/cercor/bhag113 [code]
- Long-term reliability and stability of parameterized resting state EEG: evidence from a five-year follow-up.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: psych, broom, lmerTest, 6 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, 16 scripts, and 5 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:e0afc99f247488f4…
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.
