OSCR

The time interval from amyloid to tau PET positivity varies by age, sex and APOE-ε4 status.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 2 matches
  1. [1] § Methods › Statistical analyses ↔ main stats analyses.R, lines 407–458 · score 0.64 · concurrent amyloid tau, CDR SB, 65–75, LME, symptom onset, pairwise
  2. [2] § Methods › Amyloid and tau PET measures ↔ Dataset creation and variables definition.R, lines 1–58 · score 0.52 · Mesial temporal, ucberkeley, parietal, FBB, FBP, composite

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 · 458 lines · 23 KB · no license · 1 match

  1. ###factors influencing amyloid or tau onset age ###
  2. dataset_agespaper <- read_csv("/Users/martamilaaloma/Documents/Datasets/ADNI/Onset ages project/dataset_agespaper.csv")
  3. ####Demographics and estimated ages by sex ####
  4. table <- CreateTableOne(vars = c("Age_amyPET", "APOE_binary", "Race", "PTEDUCAT", "DIAGNOSIS", "MMSCORE","CDRSB", "CDGLOBAL", "SUVR_compositeRef", "AmyPET_bin", "MesialTemporal", "TauPET_bin"), strata = "PTGENDER", addOverall = T, data = dataset_all_bl_, test=T, testNonNormal = TRUE)
  5. df_table <- as.data.frame(print(table, showAllLevels = TRUE, quote = FALSE, noSpaces = TRUE, printToggle = FALSE))
  6. df_table <- df_table %>%
  7. rownames_to_column(var = "Variable")
  8. n_counts <- sapply(dataset_all_bl_amy [, c("Age", "APOE_binary", "Race", "PTEDUCAT","CDGLOBAL", "SUVR_compositeRef", "MesialTemporal", "Amyloid_age_mean", "Tau_age_mean", "est_conversion_age_tau")],
  9. function(x) sum(!is.na(x)))
  10. write.csv(df_table, "results_sex.csv", row.names = FALSE)
  11. #### Main effects of demographics on age at amyloid and tau positivity ####
  12. model_amyloid <- lm(Amyloid_age_mean ~ APOE_binary, data = subset(dataset_bl_amy, PTGENDER=="Men"))
  13. summary(model_amyloid )
  14. model_tau <- lm(Tau_age_mean ~ PTGENDER*APOE_binary , data = dataset_bl_tau)
  15. summary(model_tau )
  16. #### Association between age at amyloid and tau positivity####
  17. model_age_Ass <- lm( Tau_age_mean ~ Amyloid_age_mean*PTGENDER*APOE_binary , data = dataset_bl_cdr, family = gaussian)
  18. summary(model_age_Ass)
  19. ####lag between amyloid and tau ages####
  20. lag_model <- lm(year_diff_amytau ~ Amyloid_age_mean*PTGENDER*APOE_binary , data = dataset_bl_cdr)
  21. summary(lag_model)
  22. #HIST of lag distribution
  23. hist(dataset_bl_cdr$year_diff_amytau, col = rgb(0, 0, 1, 0.1),
  24. main = "Amyloid-tau interval distribution", xlab = "Amyloid-tau interval (years)", breaks = 20, xlim = c(-20, 30), ylim = c(0,20))
  25. abline(v = 0, col = "red", lwd = 2)
  26. abline(v = -4, col = "black", lty = 2, lwd = 2)
  27. abline(v = 4, col = "black", lty = 2, lwd = 2)
  28. ####figures####
  29. #boxplot ages and interval by sex and apoe
  30. A <- ggplot(subset(dataset_bl_cdr, !is.na(APOE_binary)),
  31. aes(x = interaction(PTGENDER, APOE_binary),
  32. y = Amyloid_age_mean,
  33. fill = interaction(PTGENDER, APOE_binary))) +
  34. geom_boxplot(outlier.shape = NA, alpha = 0.3, show.legend = FALSE) +
  35. geom_jitter(aes(color = interaction(PTGENDER, APOE_binary), shape = APOE_binary),
  36. width = 0.2, alpha = 0.8, size = 1.5, show.legend = F) +
  37. scale_fill_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  38. scale_color_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  39. scale_shape_manual(values = c("non-carrier" = 16, "carrier" = 17)) +
  40. scale_y_continuous(limits = c(30, 95), breaks = seq(35, 95, by = 10)) +
  41. scale_x_discrete(labels = c(
  42. "Men.carrier" = "Men",
  43. "Women.carrier" = "Women",
  44. "Men.non-carrier" = "Men",
  45. "Women.non-carrier" ="Women"))+
  46. theme_classic() + theme(axis.title.y = element_text(size = 16),
  47. axis.text.x = element_text(size = 14),
  48. axis.text.y = element_text(size = 14)) +
  49. labs(title = "",
  50. x = "",
  51. y = "Estimated age at amyloid PET positivity (years)")
  52. B <- ggplot(subset(dataset_bl_cdr, !is.na(APOE_binary)),
  53. aes(x = interaction(PTGENDER, APOE_binary),
  54. y = Tau_age_mean,
  55. fill = interaction(PTGENDER, APOE_binary))) +
  56. geom_boxplot(outlier.shape = NA, alpha = 0.3, show.legend = FALSE) +
  57. geom_jitter(aes(color = interaction(PTGENDER, APOE_binary), shape = APOE_binary),
  58. width = 0.2, alpha = 0.8, size = 1.5, show.legend = F) +
  59. scale_y_continuous(limits = c(30, 95), breaks = seq(35, 95, by = 10)) +
  60. scale_fill_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  61. scale_color_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  62. scale_shape_manual(values = c("non-carrier" = 16, "carrier" = 17)) +
  63. scale_x_discrete(labels = c(
  64. "Men.carrier" = "Men",
  65. "Women.carrier" = "Women",
  66. "Men.non-carrier" = "Men",
  67. "Women.non-carrier" ="Women"
  68. )) +
  69. theme_classic() + theme(axis.title.y = element_text(size = 16),
  70. axis.text.x = element_text(size = 14),
  71. axis.text.y = element_text(size = 14)) +
  72. labs(title ="",
  73. x = "",
  74. y = "Estimated age at tau PET positivity (years)" )
  75. library(cowplot)
  76. fig1 <- plot_grid(A,B, nrow=1)
  77. ggsave("~/Documents/positivity ages paper/Fig1.pdf", plot = fig1 , width = 12, height = 6)
  78. fig2b <- ggplot(subset(dataset_bl_cdr, !is.na(APOE_binary)),
  79. aes(x = interaction(PTGENDER, APOE_binary),
  80. y = year_diff_amytau,
  81. fill = interaction(PTGENDER, APOE_binary))) +
  82. geom_boxplot(outlier.shape = NA, alpha = 0.3, show.legend = FALSE) +
  83. geom_jitter(aes(color = interaction(PTGENDER, APOE_binary), shape = APOE_binary),
  84. width = 0.2, alpha = 0.8, size = 1.5, show.legend = F) +
  85. scale_fill_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  86. scale_color_manual(values = c("forestgreen", "purple", "forestgreen", "purple")) +
  87. scale_shape_manual(values = c("non-carrier" = 16, "carrier" = 17)) +
  88. theme_classic() + theme(axis.title.y = element_text(size = 16),
  89. axis.text.x = element_text(size = 14),
  90. axis.text.y = element_text(size = 14)) +
  91. scale_x_discrete(labels = c(
  92. "Men.carrier" = "Men",
  93. "Women.carrier" = "Women",
  94. "Men.non-carrier" = "Men",
  95. "Women.non-carrier" ="Women")) +
  96. labs(title = "",
  97. x = "",
  98. y = "Amyloid-tau interval (years)")
  99. ggsave("~/Documents/positivity ages paper/Fig2b.pdf", plot = fig2b , width = 6, height = 6)
  100. #scatterplots correlations amyloid and tau ages
  101. a <- ggplot(subset(dataset_bl_cdr, !is.na(APOE_binary)),
  102. aes(x = Amyloid_age_mean, y = Tau_age_mean,
  103. colour = APOE_binary, shape = APOE_binary)) + # Map both here
  104. geom_smooth(method = "lm", show.legend = TRUE) +
  105. geom_point(show.legend = TRUE) +
  106. geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "black") +
  107. scale_color_manual(
  108. values = c("non-carrier" = "blue", "carrier" = "orange2"),
  109. name = expression(APOE*epsilon*4~status),
  110. labels = c("non-carrier" = "Non-carrier", "carrier" = "Carrier")
  111. ) +
  112. scale_shape_manual(
  113. values = c("non-carrier" = 16, "carrier" = 17),
  114. name = expression(APOE*epsilon*4~status),
  115. labels = c("non-carrier" = "Non-carrier", "carrier" = "Carrier")
  116. ) + ylim(35,90) +
  117. theme_classic() +
  118. xlab("Estimated age at amyloid PET positivity (years)") +
  119. ylab("Estimated age at tau PET positivity (years)") +
  120. theme(
  121. plot.title = element_text(size = 16, face = "bold"),
  122. axis.title = element_text(size = 14),
  123. axis.text = element_text(size = 12),
  124. legend.position = c(0.05, 0.95),
  125. legend.justification = c("left", "top")
  126. )
  127. b <- ggplot(dataset_bl_cdr, aes(x=Amyloid_age_mean, y=Tau_age_mean, group = PTGENDER, colour = PTGENDER)) +
  128. geom_smooth(method="lm",show.legend = T) + geom_point(aes(color= PTGENDER),show.legend = T)+ scale_color_manual(values=c("forestgreen", "purple"),name= "Sex") +
  129. geom_abline(intercept = 0, slope = 1, linetype = "dashed", color = "black") + ylim(35,90) +
  130. theme_classic() + xlab("Estimated age at amyloid PET positivity (years)") + ylab("Estimated age at tau PET positivity (years)") + theme(plot.title = element_text(size = 16, face = "bold"),axis.title = element_text(size = 14), # Axis titles
  131. axis.text = element_text(size = 12), legend.position = c(0.05, 0.95), legend.justification = c("left", "top"))
  132. fig3 <- plot_grid(a,b, nrow=1)
  133. ggsave("~/Documents/positivity ages paper/Fig3.pdf", plot = fig3 , width = 12, height = 6)
  134. #correlations amyloid age and interval
  135. c <- ggplot(subset(dataset_bl_cdr, !is.na(APOE_binary)),
  136. aes(x = Amyloid_age_mean, y = year_diff_amytau,
  137. colour = APOE_binary, shape = APOE_binary)) + # Map both here
  138. geom_smooth(method = "lm", show.legend = TRUE) +
  139. geom_point(show.legend = TRUE) + # Don't remap inside geom_point
  140. scale_color_manual(
  141. values = c("non-carrier" = "blue", "carrier" = "orange2"),
  142. name = expression(APOE*epsilon*4~status),
  143. labels = c("non-carrier" = "Non-carrier", "carrier" = "Carrier")
  144. ) +
  145. scale_shape_manual(
  146. values = c("non-carrier" = 16, "carrier" = 17),
  147. name = expression(APOE*epsilon*4~status),
  148. labels = c("non-carrier" = "Non-carrier", "carrier" = "Carrier")
  149. ) +
  150. theme_classic() +
  151. xlab("Estimated age at amyloid PET positivity (years)") +
  152. ylab("Amyloid-tau interval (years)") +
  153. theme(
  154. plot.title = element_text(size = 16, face = "bold"),
  155. axis.title = element_text(size = 14),
  156. axis.text = element_text(size = 12),
  157. legend.position = c(0.05, 0.05),
  158. legend.justification = c("left", "bottom")
  159. )
  160. d <- ggplot(dataset_bl_cdr, aes(x=Amyloid_age_mean, y=year_diff_amytau, group = PTGENDER, colour = PTGENDER)) +
  161. geom_smooth(method="lm",show.legend = T) + geom_point(aes(color= PTGENDER),show.legend = T)+ scale_color_manual(values=c("forestgreen", "purple"), name="Sex") +
  162. theme_classic() + xlab("Estimated age at amyloid PET positivity (years)") + ylab("Amyloid-tau interval (years)") + theme(plot.title = element_text(size = 16, face = "bold"),axis.title = element_text(size = 14), # Axis titles
  163. axis.text = element_text(size = 12),legend.position = c(0.05, 0.05), # Top left inside the plot
  164. legend.justification = c("left", "bottom"))
  165. fig4 <- plot_grid(c,d, nrow=1)
  166. ggsave("~/Documents/positivity ages paper/Fig4.pdf", plot = fig4 , width = 12, height = 6)
  167. # correlations interval and conversion age
  168. e <- ggplot(subset(dataset_all_bl_comb, !is.na(APOE_binary)), aes(x=year_diff_amytau, y=est_conversion_age_tau, group = APOE_binary, colour = APOE_binary)) +
  169. geom_smooth(method="lm", show.legend = F) + geom_point(aes(color= APOE_binary), show.legend = F)+ scale_color_manual(values=c("darkblue", "forestgreen"),name= expression(APOE*epsilon*4~status)) +
  170. theme_classic() + xlab("Amyloid-tau lag (years)") + ylab("Symptom onset age (years)")
  171. f <- ggplot(dataset_all_bl_comb, aes(x=year_diff_amytau, y=est_conversion_age_tau, group = PTGENDER, colour = PTGENDER)) +
  172. geom_smooth(method="lm", show.legend = F) + geom_point(aes(color= PTGENDER), show.legend = F)+ scale_color_manual(values=c("darkgrey", "purple"), name="Sex") +
  173. theme_classic() + xlab("Amyloid-tau lag (years)") + ylab("Symptom onset age (years)")
  174. fig <- plot_grid(a, b, c, d, e, f, nrow=3)
  175. ggsave("~/Documents/AAIC25/Fig.pdf", plot = fig , width = 4, height = 7)
  176. ##plotting CDRSB trajectories as function of amyloid time by estimated ages groups ####
  177. dataset_agespaper$years_amy_onset <- dataset_agespaper$Age_cdr - dataset_agespaper$Amyloid_age_mean
  178. dataset_agespaper$years_tau_onset <- dataset_agespaper$Age_cdr - dataset_agespaper$Tau_age_mean
  179. #plot amyloid time
  180. amy_plot <- ggplot(subset(dataset_agespaper, !is.na(amy_age_group)), aes(x = years_amy_onset, y = CDRSB)) +
  181. geom_point(size = 1, show.legend = FALSE, aes(color = amy_age_group, shape = APOE_binary)) +
  182. geom_line(aes(group = RID, color = amy_age_group), alpha = 0.3, size = 0.2, show.legend = FALSE) +
  183. geom_smooth(aes(color = amy_age_group), method = "gam", show.legend = FALSE,
  184. formula = y ~ s(x, k = 3), size = 1.5) +
  185. geom_hline(yintercept = 2.5, linetype = "solid", color = "black") +
  186. # Arrows
  187. annotate("segment", x = 15.7, xend = 15.7, y = 2.8 - arrow_length , yend = -2.2,
  188. arrow = arrow(length = unit(0.25, "cm")), color = "#7570b3", size = 1) +
  189. annotate("segment", x = 14.1, xend = 14.1, y = 2.8 - arrow_length, yend = -2.2 ,
  190. arrow = arrow(length = unit(0.25, "cm")), color = "#d95f02", size = 1) +
  191. scale_x_continuous(breaks = seq(-10, 30, by = 5)) +
  192. scale_color_manual(values = c("< 65" = "#7570b3", "65-75" = "#d95f02", "> 75" = "#1b9e77")) +
  193. labs(x = "Estimated years from amyloid PET positivity", y = "CDR-SB") +
  194. theme_classic() +
  195. coord_cartesian(ylim = c(y_target - arrow_length - 0.5, max(dataset_agespaper$CDRSB, na.rm = TRUE))) +
  196. theme(
  197. axis.title.x = element_text(size = 14),
  198. axis.title.y = element_text(size = 14)
  199. )
  200. #plot tau time
  201. tau_plot <- ggplot(subset(dataset_agespaper, !is.na(tau_age_group)&!is.na(APOE_binary) ), aes(x = years_tau_onset, y = CDRSB)) +
  202. geom_point(size = 1, show.legend = FALSE, aes(color = tau_age_group, shape = APOE_binary)) +
  203. geom_line(aes(group = RID, color = tau_age_group), alpha = 0.3, size = 0.2, show.legend = FALSE) +
  204. geom_smooth(aes(color = tau_age_group), method = "gam", show.legend = FALSE,
  205. formula = y ~ s(x, k = 3), size = 1.5) +
  206. geom_hline(yintercept = 2.5, linetype = "solid", color = "black") +
  207. # Arrows
  208. annotate("segment", x = 11.7, xend = 11.7, y = 2.9 - arrow_length , yend = -2.2,
  209. arrow = arrow(length = unit(0.25, "cm")), color = "#7570b3", size = 1) +
  210. annotate("segment", x = 8.7, xend = 8.7, y = 2.9 - arrow_length, yend = -2.2 ,
  211. arrow = arrow(length = unit(0.25, "cm")), color = "#d95f02", size = 1) +
  212. annotate("segment", x = 8.4, xend = 8.4, y = 2.9 - arrow_length, yend = -2.2 ,
  213. arrow = arrow(length = unit(0.25, "cm")), color = "#1b9e77", size = 1) +
  214. scale_x_continuous(breaks = seq(-10, 20, by = 5)) +
  215. scale_color_manual(values = c("< 65" = "#7570b3", "65-75" = "#d95f02", "> 75" = "#1b9e77")) +
  216. labs(x = "Estimated years from tau PET positivity", y = "CDR-SB") +
  217. theme_classic() +
  218. coord_cartesian(ylim = c(y_target - arrow_length - 0.5, max(dataset_agespaper$CDRSB, na.rm = TRUE))) +
  219. theme(
  220. axis.title.x = element_text(size = 14),
  221. axis.title.y = element_text(size = 14)
  222. )
  223. #plot interval
  224. plot_int_amy <- ggplot(subset(dataset_agespaper, interval_group== "AmyFirst_less10" |interval_group== "AmyFirst_more10" | interval_group== "Concurrent_amytau" ), aes(x = years_amy_onset, y = CDRSB)) +
  225. geom_point(size = 1, show.legend = FALSE, aes(color = interval_group, shape = APOE_binary)) +
  226. geom_line(aes(group = RID, color = interval_group), alpha = 0.3, size = 0.2, show.legend = FALSE) +
  227. geom_smooth(aes(color = interval_group), method = "gam", show.legend = FALSE,
  228. formula = y ~ s(x, k = 3), size = 1.5) +
  229. geom_hline(yintercept = 2.5, linetype = "solid", color = "black") +
  230. # Arrows
  231. annotate("segment", x = 13.2, xend = 13.2, y = 2.9 - arrow_length , yend = -2.2,
  232. arrow = arrow(length = unit(0.25, "cm")), color = "brown", size = 1) +
  233. annotate("segment", x = 25.8, xend = 25.8, y = 2.9 - arrow_length, yend = -2.2 ,
  234. arrow = arrow(length = unit(0.25, "cm")), color = "red", size = 1) +
  235. scale_x_continuous(breaks = seq(-10, 30, by = 5)) +
  236. scale_color_manual(values = c("Concurrent_amytau" = "brown","AmyFirst_less10" = "orange", "AmyFirst_more10" = "red")) +
  237. labs(x = "Estimated years from amyloid PET positivity", y = "CDR-SB") +
  238. theme_classic() +
  239. coord_cartesian(ylim = c(y_target - arrow_length - 0.5, max(dataset_agespaper$CDRSB, na.rm = TRUE))) +
  240. theme(
  241. axis.title.x = element_text(size = 14),
  242. axis.title.y = element_text(size = 14)
  243. )
  244. plot_int_tau <- ggplot(subset(dataset_agespaper, interval_group== "AmyFirst_less10" |interval_group== "AmyFirst_more10" | interval_group== "Concurrent_amytau" ), aes(x = years_tau_onset, y = CDRSB)) +
  245. geom_point(size = 1, show.legend = FALSE, aes(color = interval_group, shape = APOE_binary)) +
  246. geom_line(aes(group = RID, color = interval_group), alpha = 0.3, size = 0.2, show.legend = FALSE) +
  247. geom_smooth(aes(color = interval_group), method = "gam", show.legend = FALSE,
  248. formula = y ~ s(x, k = 3), size = 1.5) +
  249. geom_hline(yintercept = 2.5, linetype = "solid", color = "black") +
  250. # Arrows
  251. annotate("segment", x = 11.3, xend = 11.3, y = 2.9 - arrow_length , yend = -2.2,
  252. arrow = arrow(length = unit(0.25, "cm")), color = "brown", size = 1) +
  253. annotate("segment", x = 10.4, xend = 10.4, y = 2.9 - arrow_length, yend = -2.2 ,
  254. arrow = arrow(length = unit(0.25, "cm")), color = "orange", size = 1) +
  255. annotate("segment", x = 10.7, xend = 10.7, y = 2.9 - arrow_length, yend = -2.2 ,
  256. arrow = arrow(length = unit(0.25, "cm")), color = "red", size = 1) +
  257. scale_x_continuous(breaks = seq(-10, 20, by = 5)) +
  258. scale_color_manual(values = c("Concurrent_amytau" = "brown","AmyFirst_less10" = "orange", "AmyFirst_more10" = "red")) +
  259. labs(x = "Estimated years from tau PET positivity", y = "CDR-SB") +
  260. theme_classic() +
  261. coord_cartesian(ylim = c(y_target - arrow_length - 0.5, max(dataset_agespaper$CDRSB, na.rm = TRUE))) +
  262. theme(
  263. axis.title.x = element_text(size = 14),
  264. axis.title.y = element_text(size = 14)
  265. )
  266. fig_gams <- plot_grid(amy_plot,tau_plot,plot_int_amy, plot_int_tau, nrow=2)
  267. ggsave("~/Documents/positivity ages paper/Fig_gams.jpg", plot = fig_gams , width = 12, height = 12)
  268. ####Analyses of rates of change from CDR >0 in CI individuals ####
  269. # filter those RID with two consecutive CDR>0 and a last visit of CDR>0
  270. CI_data <- dataset_agespaper %>%
  271. arrange(RID, VISDATE) %>% # Make sure data is ordered correctly
  272. group_by(RID) %>%
  273. mutate(
  274. cdr_positive = CDGLOBAL > 0,
  275. lead_cdr_positive = lead(cdr_positive),
  276. is_first_of_two = cdr_positive & lead_cdr_positive
  277. ) %>%
  278. # Identify first visit where two consecutive CDR > 0 begin
  279. mutate(first_pos_visdate = ifelse(is_first_of_two, VISDATE, NA)) %>%
  280. fill(first_pos_visdate, .direction = "down") %>%
  281. # Keep only those with a valid starting point
  282. filter(!is.na(first_pos_visdate)) %>%
  283. # Keep only visits from that point onward
  284. filter(VISDATE >= first_pos_visdate) %>%
  285. # Check that the LAST visit per person still has CDR > 0
  286. group_by(RID) %>%
  287. filter(last(CDGLOBAL) > 0) %>%
  288. ungroup()
  289. #time since first cdr>0
  290. CI_data <- CI_data %>%
  291. arrange(RID, VISDATE) %>%
  292. group_by(RID) %>%
  293. mutate(
  294. CIonset_date = min(VISDATE), # first CDR > 0 visit already in data
  295. years_since_CIonset = as.numeric(difftime(VISDATE, CIonset_date, units = "days")) / 365.25
  296. ) %>%
  297. ungroup()
  298. CI_5Y <- subset(CI_data, years_since_CIonset<=5)
  299. CI_5Y <- CI_5Y %>%
  300. group_by(RID) %>%
  301. arrange(VISDATE) %>% # or whatever your time variable is
  302. mutate(last_cdr = last(CDGLOBAL)) %>% # assuming CDR global score is called `CDR`
  303. filter(last_cdr != 0) %>% # keep only if last CDR > 0
  304. ungroup()
  305. ##bl datasets to report characteristics of CI subset##
  306. ##for amyloid data
  307. dataset_bl_amyCI <- CI_5Y %>%
  308. filter(!is.na(Amyloid_age_mean))%>%
  309. arrange(RID, VISDATE)
  310. dataset_bl_amyCI <- dataset_bl_amyCI %>%
  311. distinct(RID, .keep_all = TRUE)
  312. ##for tau data##
  313. dataset_bl_tauCI <- CI_5Y %>%
  314. filter(!is.na(Tau_age_mean))%>%
  315. arrange(RID, VISDATE)
  316. dataset_bl_tauCI <- dataset_bl_tauCI %>%
  317. distinct(RID, .keep_all = TRUE)
  318. dataset_bl_combCI <- subset(dataset_bl_amyCI, !is.na(Tau_age_mean))
  319. ##characteristics of the CI dataset
  320. table <- CreateTableOne(vars = c("Age", "Edu_level", "PTGENDER", "Amyloid_age_mean", "Tau_age_mean","amy_age_group", "tau_age_group","Centiloids", "TRACER" ,"APOE_binary", "Race", "PTEDUCAT", "DIAGNOSIS", "MMSCORE","CDRSB", "CDGLOBAL", "SUVR_compositeRef", "AmyPET_bin", "MesialTemporal", "TauPET_bin"), addOverall = T, data = dataset_bl_amyCI, test=T, testNonNormal = TRUE)
  321. df_table <- as.data.frame(print(table, showAllLevels = TRUE, quote = FALSE, noSpaces = TRUE, printToggle = FALSE))
  322. df_table <- df_table %>%
  323. rownames_to_column(var = "Variable")
  324. n_counts <- sapply(dataset_bl_amyCI [, c("Age", "APOE_binary", "Race", "PTEDUCAT","CDGLOBAL", "SUVR_compositeRef", "MesialTemporal", "Amyloid_age_mean", "Tau_age_mean", "est_conversion_age_tau")],
  325. function(x) sum(!is.na(x)))
  326. dataset_last_amyCI <- CI_5Y %>%
  327. filter(!is.na(Amyloid_age_mean))%>%
  328. arrange(RID, desc(VISDATE))
  329. dataset_last_amyCI <- dataset_last_amyCI %>%
  330. distinct(RID, .keep_all = TRUE)
  331. dataset_last_tauCI <- CI_5Y %>%
  332. filter(!is.na(Tau_age_mean))%>%
  333. arrange(RID, desc(VISDATE))
  334. dataset_last_tauCI <- dataset_last_tauCI %>%
  335. distinct(RID, .keep_all = TRUE)
  336. dataset_last_combCI <- subset(dataset_last_amyCI, !is.na(Tau_age_mean))
  337. ##Run LME models##
  338. library(lme4)
  339. library(lmerTest)
  340. library(emmeans)
  341. model1 <- lmer(CDRSB ~ years_since_CIonset *tau_age_group*PTGENDER + (1 +years_since_CIonset | RID), data = CI_5Y)
  342. summary(model1)
  343. anova(model1)
  344. emm <- emtrends(model1, pairwise ~tau_age_group, var = "years_since_CIonset")
  345. emm$contrasts
  346. ##plot trajectories results##
  347. plot_amyage <- ggplot(subset(CI_5Y,!is.na(amy_age_group)), aes(x = years_since_CIonset, y = CDRSB)) +
  348. geom_point(size=1, show.legend = F, aes(color=amy_age_group, shape = APOE_binary)) +
  349. geom_line(aes(group = RID, color =amy_age_group), alpha = 0.2, size = 0.1, show.legend = FALSE) +
  350. geom_smooth( aes(color = amy_age_group), method="lm", show.legend = F, size=1.5, linetype="solid") +
  351. scale_color_manual(values = c("< 65" = "#7570B3", "65-75" = "#D95F02", "> 75" = "#1B9E77")) +
  352. labs(x = "Years since symptom onset", y ="CDR-SB") +
  353. theme_classic() +
  354. theme(
  355. axis.title.x = element_text(size = 14), # Change x-axis label size
  356. axis.title.y = element_text(size = 14))
  357. plot_tauage <- ggplot(subset(CI_5Y,!is.na(tau_age_group)), aes(x = years_since_CIonset, y = CDRSB)) +
  358. geom_point(size=1, show.legend = F, aes(color=tau_age_group, shape = APOE_binary)) +
  359. geom_line(aes(group = RID, color =tau_age_group), alpha = 0.2, size = 0.1, show.legend = F) +
  360. geom_smooth( aes(color = tau_age_group), method="lm", show.legend = F, size=1.5, linetype="solid") +
  361. scale_color_manual(values = c("< 65" = "#7570B3", "65-75" = "#D95F02", "> 75" = "#1B9E77")) +
  362. labs(x = "Years since symptom onset", y ="CDR-SB") +
  363. theme_classic() +
  364. theme(
  365. axis.title.x = element_text(size = 14), # Change x-axis label size
  366. axis.title.y = element_text(size = 14))
  367. plot_int <- ggplot(subset(CI_5Y, !is.na(interval_group) & interval_group!= "Tau first"), aes(x = years_since_CIonset, y = CDRSB)) +
  368. geom_point(size=1, show.legend = F, aes(color=interval_group, shape = APOE_binary)) +
  369. geom_line(aes(group = RID, color =interval_group), alpha = 0.2, size = 0.1, show.legend = FALSE) +
  370. geom_smooth( aes(color = interval_group), method="lm", show.legend = F, size=1.5, linetype="solid") +
  371. #scale_color_manual(values = c("< 65" = "#7570B3", "65-75" = "#D95F02", "> 75" = "#1B9E77")) +
  372. scale_color_manual(values = c( "Concurrent amyloid-tau" = "brown","Amyloid first < 10 years" = "orange", "Amyloid first > 10 years" = "red")) +
  373. labs(x = "Years since symptom onset", y ="CDR-SB") +
  374. theme_classic() +
  375. theme(
  376. axis.title.x = element_text(size = 14), # Change x-axis label size
  377. axis.title.y = element_text(size = 14))
  378. fig_LME <- plot_grid(plot_amyage,plot_tauage,plot_int, nrow=2)
  379. ggsave("~/Documents/positivity ages paper/Fig_LME.pdf", plot = fig_LME , width = 12, height = 12)
  380. #########################################################################################

main stats analyses.R at commit a2fc82a, no license · at the source

Overview

  1. Northern California Institute for Research and Education, San Francisco, CA, USA
  2. Department of Radiology and Biomedical Imaging, University of California San Francisco, San Francisco, CA, USA
  3. Department of Neurology, Washington University in St. Louis, St. Louis, MO, USA
Journal: The journal of prevention of Alzheimer's disease, volume 13, issue 8, article 100622
Dates: received 26 November 2025; accepted 1 June 2026; published online 17 June 2026; in print October 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.tjpad.2026.100622 · PMID 42309020 · PMCID PMC13284470 · OpenAlex W7164914369
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: PET / SPECT (modality), human (organism), Alzheimer's / dementia (population), clinical / translational (subfield)
Methods: Statistics, fMRI & imaging, Smoothing, state filtering, decompositions
Keywords: Alzheimer’s disease, Amyloid PET positivity, Tau PET positivity, Biological clock, Clinical trials, Symptom onset
MeSH: Alzheimer Disease*, Amyloid beta-Peptides*, Apolipoprotein E4*, tau Proteins*, Age Factors, Aged, Aged, 80 and over, Brain, Disease Progression, Female, Humans, Longitudinal Studies, Male, Positron-Emission Tomography, Sex Factors, Time Factors (* major topic)
Topic: Dementia and Cognitive Impairment Research (Psychiatry and Mental health, Medicine), according to OpenAlex
Funding: National Institutes of Health
Citations: cited by 2 papers (Europe PMC); 51 references in the paper

Abstract

Background: Alzheimer’s disease (AD) progression varies widely among individuals. Identifying factors influencing timing of pathology and clinical progression is crucial for optimizing early intervention trials.

Objectives: To investigate how the estimated age at amyloid and tau PET positivity, and the time interval between these two key events (“amyloid–tau time interval”), relate to symptom onset and clinical progression, and to assess the effects of APOE-ε4 status and sex on these associations.

Design: This analysis used data from the Alzheimer’s Disease Neuroimaging Initiative (ADNI) and the Harvard Aging Brain Study (HABS).

Setting: The ADNI is a multicenter observational cohort conducted at 55 sites across the United States; The HABS is a longitudinal, single-center observational cohort.

Participants: This study included participants with at least one positive amyloid PET scan (ADNI n = 792; HABS n = 104) or at least one positive tau PET scan (ADNI n = 212; HABS n = 48). All participants had information on sex, APOE-ε4 status, and longitudinal cognitive assessments.

Measurements: We examined the influence of APOE-ε4 status, sex, and their interaction on the estimated age at biomarker positivity and the amyloid-tau time interval. Accelerated Failure Time (AFT) models were used to predict time to symptom onset (CDR > 0) based on estimated biomarker positivity age and the amyloid-tau time interval. Linear mixed-effects (LME) models evaluated differences in the rate of cognitive decline, as measured by CDR-SB, over five years following symptom onset according to estimated biomarker positivity age and amyloid-tau time interval. Additional models included interaction terms with sex or APOE-ε4 status.

Results: The amyloid-tau time interval varied markedly between individuals and was shorter in APOE-ε4 carriers, women, and those with older age at amyloid PET positivity. APOE-ε4 carriers and women became amyloid and tau PET positive at younger ages. Following amyloid PET positivity, a shorter time to tau PET positivity predicted earlier symptom onset. After symptom onset, faster cognitive decline was observed in individuals with younger ages at amyloid or tau PET positivity. The time to symptom onset following tau PET positivity, or the rate of cognitive decline after symptom onset, were not influenced by the amyloid-tau time interval.

Conclusions: After becoming amyloid PET positive, APOE-ε4 carriers, women and older individuals may have a shorter window for detection and treatment before they become tau PET positive and develop symptoms. These findings should guide the identification of individuals at highest risk of rapid AD progression, enabling more efficient participant selection for clinical trials.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

cind/Amyloid-tau-interval-paper-Mil--Alom-

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: a2fc82ac10bf3a531551ae579bbd6813adbaebfe, 29 September 2025
Languages: R (3)
Size: 3 files, 3 scripts
Software Heritage: not archived
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: broom (1 file), cowplot (1 file), emmeans (1 file), ggplot2 (1 file), lme4 (1 file), lmerTest (1 file), survival (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
3 files

cind/Amyloid-tau-interval-paper-Mil-Alom

License: none: the authors keep all their rights
State: the link is dead, verified on 27 September 2026
Evidence: found in the paper
Software Heritage: not archived
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link is dead
  • 27 September 2026: the link is dead

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 3 scripts, each with its path and the digest of its content;
  • 2 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

Data from this study and the study methodology report may be accessed from the ADNI Laboratory of NeuroImaging (LONI) database: adni.loni.usc.edu. Access the HABS data may be requested at habs.mgh.harvard.edu/researchers/request-data/. The annotated code used for study analyses is provided in full (https://github.com/cind/Amyloid-tau-interval-paper-Mil-Alom (https://github.com/cind/Amyloid-tau-interval-paper-Mil--Alom-)).

Reproduced under the paper's license (CC BY), 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 2, 28 September 2026

  • Authors: added Marta Milà-Alomà (0000-0002-5687-4597); Pamela Thropp (0009-0006-5371-8667); removed Marta Milà-Alomà; Pamela Thropp

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 6 keywords, 16 MeSH terms, 1 funder, 49 references.

Cite

This paper

Milà-Alomà, M., Hausle, I., Petersen, K. K., Thropp, P., Schindler, S. E., & Tosun, D. (2026). The time interval from amyloid to tau PET positivity varies by age, sex and APOE-ε4 status. The journal of prevention of Alzheimer's disease, 13(8), 100622. https://doi.org/10.1016/j.tjpad.2026.100622

BibTeX

@article{milaaloma2026time,
author = {Milà-Alomà, Marta and Hausle, Isabella and Petersen, Kellen K and Thropp, Pamela and Schindler, Suzanne E and Tosun, Duygu},
title = {{The time interval from amyloid to tau PET positivity varies by age, sex and APOE-ε4 status}},
journal = {The journal of prevention of Alzheimer's disease},
year = {2026},
month = jun,
volume = {13},
number = {8},
pages = {100622},
publisher = {Elsevier},
issn = {2426-0266},
doi = {10.1016/j.tjpad.2026.100622},
url = {https://doi.org/10.1016/j.tjpad.2026.100622},
pmid = {42309020},
pmcid = {PMC13284470}
}

RIS

TY - JOUR
AU - Milà-Alomà, Marta
AU - Hausle, Isabella
AU - Petersen, Kellen K
AU - Thropp, Pamela
AU - Schindler, Suzanne E
AU - Tosun, Duygu
TI - The time interval from amyloid to tau PET positivity varies by age, sex and APOE-ε4 status
T2 - The journal of prevention of Alzheimer's disease
J2 - J Prev Alzheimers Dis
PY - 2026
DA - 2026/06/17
VL - 13
IS - 8
SP - 100622
SN - 2426-0266
PB - Elsevier
DO - 10.1016/j.tjpad.2026.100622
UR - https://doi.org/10.1016/j.tjpad.2026.100622
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.tjpad.2026.100622",
"type": "article-journal",
"title": "The time interval from amyloid to tau PET positivity varies by age, sex and APOE-ε4 status",
"container-title": "The journal of prevention of Alzheimer's disease",
"author": [
{
"family": "Milà-Alomà",
"given": "Marta"
},
{
"family": "Hausle",
"given": "Isabella"
},
{
"family": "Petersen",
"given": "Kellen K"
},
{
"family": "Thropp",
"given": "Pamela"
},
{
"family": "Schindler",
"given": "Suzanne E"
},
{
"family": "Tosun",
"given": "Duygu"
}
],
"container-title-short": "J Prev Alzheimers Dis",
"volume": "13",
"issue": "8",
"page": "100622",
"DOI": "10.1016/j.tjpad.2026.100622",
"PMID": "42309020",
"PMCID": "PMC13284470",
"ISSN": "2426-0266",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.tjpad.2026.100622",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
17
]
]
}
}

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 neuroscience
In common: broom, lmerTest, lme4, 3 other tools, PET / SPECT, Alzheimer's / dementia, 5 references
[2] doi:10.1038/s44400-026-00100-z [code]
Peripheral blood microarray-based transcriptomic and epigenetic analyses identify immune, inflammation, and metabolic dysregulation in Alzheimer's disease.
Journal: NPJ dementia
In common: survival, broom, lme4, 1 other tool, Alzheimer's / dementia, 4 references
[3] doi:10.1038/s41467-026-71732-1 [code]
Trajectories of plasma and CSF MTBR-tau243 and phosphorylated-tau species across the Alzheimer's disease continuum.
Journal: Nature communications
In common: PET / SPECT, Alzheimer's / dementia, 3 references, author Suzanne E Schindler
[4] doi:10.1126/sciadv.aee2305 [code]
Prediction of mild cognitive impairment progression using time-sensitive multimodal biomarkers.
Journal: Science advances
In common: survival, ggplot2, tidyverse, PET / SPECT, Alzheimer's / dementia, clinical / translational, 3 references
[5] 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 communications
In common: survival, broom, emmeans, 4 other tools
[6] 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: survival, broom, emmeans, 4 other tools
[7] doi:10.1002/alz.71711 [code]
Exploring longitudinal relationships among Alzheimer's disease biomarkers.
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association
In common: ggplot2, tidyverse, PET / SPECT, Alzheimer's / dementia, clinical / translational, 4 references
[8] doi:10.1093/brain/awag075 [code]
Modelling the temporal evolution of plasma p-tau217, amyloid PET, tau PET and cognition.
Journal: Brain : a journal of neurology
In common: tidyverse, PET / SPECT, Alzheimer's / dementia, 5 references
[9] doi:10.1016/j.nicl.2026.104053 [code]
Childhood white matter organization predicts adolescent internalizing problems among youth with and without ADHD.
Journal: NeuroImage. Clinical
In common: broom, emmeans, lmerTest, 4 other tools
[10] doi:10.1016/j.isci.2026.116747 [code]
Age and loneliness relate to reduced trust learning and alterations in amygdala function.
Journal: iScience
In common: broom, emmeans, lmerTest, 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.

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.