OSCR

Individual differences in adolescent cortical development are associated with neighborhood characteristics: Longitudinal findings from the ABCD study.

Code ↔ Paper

5 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 5 matches
  1. [1] § Materials and methods › Measures › Cortical development ↔ Analysis_Scripts/Adjusted_Latent_Growth_Models.R, lines 171–210 · score 0.90 · SIGNA UHP, Discovery MR750, SIGNA Premier, dStream, Prisma fit, Achieva
  2. [2] § Materials and methods › Statistical analyses › Adjusted analyses ↔ Analysis_Scripts/Adjusted_Latent_Growth_Models.R, lines 171–210 · score 0.86 · Discovery MR750, SIGNA Premier, dStream, Prisma fit, Achieva, Ingenia
  3. [3] § Materials and methods › Statistical analyses › Association between neighborhood characteristics and individual differences in cortical development ↔ Analysis_Scripts/Latent_Growth_Models.R, lines 308–347 · score 0.77 · maximum possible score, transformed surface area, model convergence, latent growth models, POMS, timepoints
  4. [4] § Materials and methods › Statistical analyses › Examining trajectories of cortical development: latent growth models ↔ Analysis_Scripts/Latent_Growth_Models.R, lines 44–91 · score 0.72 · latent basis growth, latent growth models, support model convergence, linear, variances, surface area
  5. [5] § Materials and methods › Statistical analyses › Assessing subgroups of cortical development: growth mixture models and k-means clustering ↔ Analysis_Scripts/Growth_Mixture_Models.R, lines 216–289 · score 0.54 · growth mixture model, cortical surface area, subgroups

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 · 880 lines · 23 KB · no license · 2 matches

  1. ######################################################
  2. # Project: Association between Neighbourhood Characteristics and Cortical Development
  3. # Author: Chloe Carrick
  4. # Date: September 2025
  5. ######################################################
  6. # Load libraries
  7. library(dplyr)
  8. library(psych)
  9. library(ggplot2)
  10. library(cowplot)
  11. library(pacman)
  12. library(lavaan)
  13. library(tidyverse)
  14. library(lcmm)
  15. library(gridExtra)
  16. library(semPlot)
  17. library(corrplot)
  18. library(kml)
  19. # Read in data
  20. brain = read.csv("brain.csv")
  21. # Set variables as factor/numeric
  22. brain[,c(1:3, 11, 12)] <- lapply(brain[,c(1:3, 11, 12)], as.factor)
  23. brain[,c(4:10, 13)] <- lapply(brain[,c(4:10, 13)], as.numeric)
  24. sapply(brain, class)
  25. # Set up data
  26. ######################################################
  27. # Neighbourhood Disadvantage
  28. ######################################################
  29. # Thickness
  30. t2brain <- brain[,c(1, 3, 4, 10, 11, 12, 13)]
  31. # Surface area
  32. s2brain <- brain[,c(1, 3, 5, 10, 11, 12, 13)]
  33. # The following code selects scanner type for the first neuroimaging timepoint
  34. # If there is no neuroimaging timepoint 1, the scanner type at second neuroimaging timepoint is used
  35. # If there is no neuroimaging timepoint 1 or 2, the scanner type at the third neuroimaging timepoint is used
  36. t2brain <- t2brain %>% group_by(src_subject_id) %>% mutate(
  37. scanner = case_when(
  38. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  39. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  40. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]), TRUE ~ NA_character_ )) %>%
  41. ungroup()
  42. s2brain <- s2brain %>% group_by(src_subject_id) %>% mutate(
  43. scanner = case_when(
  44. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  45. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  46. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]))) %>%
  47. ungroup()
  48. # Convert to wide format
  49. wt2brain <- t2brain %>% pivot_wider(names_from = timepoint, values_from = thickness)
  50. ws2brain <- s2brain %>% pivot_wider(names_from = timepoint, values_from = SA)
  51. # Rename columns to T1, T2, T3
  52. wt2brain <- wt2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  53. ws2brain <- ws2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  54. # Make thickness values larger
  55. wt2brain$T1 <- wt2brain$T1*10
  56. wt2brain$T2 <- wt2brain$T2*10
  57. wt2brain$T3 <- wt2brain$T3*10
  58. ######################################################
  59. # Educational Opportunity
  60. ######################################################
  61. # Thickness
  62. education_t2brain <- brain[,c(1, 3, 4, 8, 11, 12, 13)]
  63. # Surface area
  64. education_s2brain <- brain[,c(1, 3, 5, 8, 11, 12, 13)]
  65. # The following code selects scanner type for the first neuroimaging timepoint
  66. # If there is no neuroimaging timepoint 1, the scanner type at second neuroimaging timepoint is used
  67. # If there is no neuroimaging timepoint 1 or 2, the scanner type at the third neuroimaging timepoint is used
  68. education_t2brain <- education_t2brain %>% group_by(src_subject_id) %>% mutate(
  69. scanner = case_when(
  70. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  71. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  72. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]))) %>%
  73. ungroup()
  74. education_s2brain <- education_s2brain %>% group_by(src_subject_id) %>% mutate(
  75. scanner = case_when(
  76. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  77. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  78. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]))) %>%
  79. ungroup()
  80. # Convert to wide format
  81. education_wt2brain <- education_t2brain %>% pivot_wider(names_from = timepoint, values_from = thickness)
  82. education_ws2brain <- education_s2brain %>% pivot_wider(names_from = timepoint, values_from = SA)
  83. # Rename columns to T1, T2, T3
  84. education_wt2brain <- education_wt2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  85. education_ws2brain <- education_ws2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  86. # Make thickness values larger
  87. education_wt2brain$T1 <- education_wt2brain$T1*10
  88. education_wt2brain$T2 <- education_wt2brain$T2*10
  89. education_wt2brain$T3 <- education_wt2brain$T3*10
  90. ######################################################
  91. # Health/Environmental Opportunity
  92. ######################################################
  93. # Thickness
  94. health_t2brain <- brain[,c(1, 3, 4, 9, 11, 12, 13)]
  95. # Surface area
  96. health_s2brain <- brain[,c(1, 3, 5, 9, 11, 12, 13)]
  97. # The following code selects scanner type for the first neuroimaging timepoint
  98. # If there is no neuroimaging timepoint 1, the scanner type at second neuroimaging timepoint is used
  99. # If there is no neuroimaging timepoint 1 or 2, the scanner type at the third neuroimaging timepoint is used
  100. health_t2brain <- health_t2brain %>% group_by(src_subject_id) %>% mutate(
  101. scanner = case_when(
  102. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  103. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  104. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]))) %>%
  105. ungroup()
  106. health_s2brain <- health_s2brain %>% group_by(src_subject_id) %>% mutate(
  107. scanner = case_when(
  108. !all(is.na(scanner[timepoint == "1"])) ~ first(scanner[timepoint == "1"]),
  109. !all(is.na(scanner[timepoint == "2"])) ~ first(scanner[timepoint == "2"]),
  110. !all(is.na(scanner[timepoint == "3"])) ~ first(scanner[timepoint == "3"]))) %>%
  111. ungroup()
  112. # Convert to wide format
  113. health_wt2brain <- health_t2brain %>% pivot_wider(names_from = timepoint, values_from = thickness)
  114. health_ws2brain <- health_s2brain %>% pivot_wider(names_from = timepoint, values_from = SA)
  115. # Rename columns to T1, T2, T3
  116. health_wt2brain <- health_wt2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  117. health_ws2brain <- health_ws2brain %>% rename(T1 = 6, T2 = 7, T3 = 8)
  118. # Make thickness values larger
  119. health_wt2brain$T1 <- health_wt2brain$T1*10
  120. health_wt2brain$T2 <- health_wt2brain$T2*10
  121. health_wt2brain$T3 <- health_wt2brain$T3*10
  122. ######################################################
  123. # Adjusted models including sex and scanner type as covariates
  124. ######################################################
  125. # 1. Neighbourhood Disadvantage
  126. ######################################################
  127. # Thickness
  128. # Dummy code sex
  129. wt2brain$sex <- ifelse(wt2brain$sex == "2", 1, 0)
  130. # Dummy code scanner
  131. wt2brain$scanner <- factor(wt2brain$scanner, levels = c("Prisma", "Prisma_fit", "DISCOVERY MR750",
  132. "Achieva dStream", "Ingenia",
  133. "SIGNA Premier", "SIGNA UHP"))
  134. # Dummy-code 7 columns
  135. dums <- dummy.code(wt2brain$scanner)
  136. colnames(dums) <- paste0("scanner", seq_len(ncol(dums)))
  137. wt2brain = cbind(wt2brain, dums)
  138. # Fit model
  139. sex_ND_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  140. s =~ 0*T1 + T2 + 1*T3
  141. s ~ ND + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  142. int ~ ND + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  143. T1 ~~ variance*T1
  144. T2 ~~ variance*T2
  145. T3 ~~ variance*T3'
  146. sex_ND_Tfitnl <- growth(sex_ND_nonlinearmodel, data = wt2brain, estimator ='mlr', missing='fiml.x')
  147. summary(sex_ND_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  148. # Surface area
  149. # Dummy code sex
  150. ws2brain$sex <- ifelse(ws2brain$sex == "2", 1, 0)
  151. # Covert to POMS
  152. # Sample min SA
  153. min_SA <- min(ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  154. max_SA <- max(ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  155. # Convert
  156. ws2brain$T1_POMS <- (ws2brain$T1 - min_SA) / (max_SA - min_SA)
  157. ws2brain$T2_POMS <- (ws2brain$T2 - min_SA) / (max_SA - min_SA)
  158. ws2brain$T3_POMS <- (ws2brain$T3 - min_SA) / (max_SA - min_SA)
  159. ws2brainPOMS = ws2brain[,c(1:5, 9:11)]
  160. ws2brain <- ws2brain[, 1:8]
  161. # Add dummy-coded scanner
  162. ws2brainPOMS = cbind(ws2brainPOMS, dums)
  163. # Fit model
  164. S_sex_ND_nonlinearmodel <-
  165. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  166. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  167. s~ND + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  168. int~ND + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  169. T1_POMS ~~ variance*T1_POMS
  170. T2_POMS ~~ variance*T2_POMS
  171. T3_POMS ~~ variance*T3_POMS'
  172. S_sex_ND_fitnl <- growth(S_sex_ND_nonlinearmodel, data = ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  173. summary(S_sex_ND_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  174. ######################################################
  175. #2. Educational Opportunity
  176. ######################################################
  177. # Thickness
  178. # Dummy code sex
  179. education_wt2brain$sex <- ifelse(education_wt2brain$sex == "2", 1, 0)
  180. # Add dummy coded scanner
  181. education_wt2brain = cbind(education_wt2brain, dums)
  182. # Fit model
  183. sex_education_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  184. s =~ 0*T1 + T2 + 1*T3
  185. s ~ education + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  186. int ~ education + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  187. T1 ~~ variance*T1
  188. T2 ~~ variance*T2
  189. T3 ~~ variance*T3'
  190. sex_education_Tfitnl <- growth(sex_education_nonlinearmodel, data = education_wt2brain, estimator ='mlr', missing='fiml.x')
  191. summary(sex_education_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  192. # Extract parameter estimates for small values
  193. parameterestimates(sex_education_Tfitnl)$se[7]
  194. parameterestimates(sex_education_Tfitnl)$se[15]
  195. # Surface area
  196. # Dummy code sex
  197. education_ws2brain$sex <- ifelse(education_ws2brain$sex == "2", 1, 0)
  198. # Covert to POMS
  199. # Sample min SA
  200. min_SA <- min(education_ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  201. max_SA <- max(education_ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  202. # Convert
  203. education_ws2brain$T1_POMS <- (education_ws2brain$T1 - min_SA) / (max_SA - min_SA)
  204. education_ws2brain$T2_POMS <- (education_ws2brain$T2 - min_SA) / (max_SA - min_SA)
  205. education_ws2brain$T3_POMS <- (education_ws2brain$T3 - min_SA) / (max_SA - min_SA)
  206. education_ws2brainPOMS = education_ws2brain[,c(1:5, 9:11)]
  207. education_ws2brain <- education_ws2brain[, 1:8]
  208. # Add dummy coded scanner
  209. education_ws2brainPOMS = cbind(education_ws2brainPOMS, dums)
  210. # Fit model
  211. S_sex_education_nonlinearmodel <-
  212. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  213. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  214. s~education + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  215. int~education + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  216. T1_POMS ~~ variance*T1_POMS
  217. T2_POMS ~~ variance*T2_POMS
  218. T3_POMS ~~ variance*T3_POMS'
  219. S_sex_education_fitnl <- growth(S_sex_education_nonlinearmodel, data = education_ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  220. summary(S_sex_education_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  221. # Extract parameter estimates for small values
  222. parameterestimates(S_sex_education_fitnl)$est[7]
  223. parameterestimates(S_sex_education_fitnl)$se[7]
  224. parameterestimates(S_sex_education_fitnl)$est[15]
  225. parameterestimates(S_sex_education_fitnl)$se[15]
  226. ######################################################
  227. #3. Health/Environmental Opportunity
  228. ######################################################
  229. # Thickness
  230. # Dummy code sex
  231. health_wt2brain$sex <- ifelse(health_wt2brain$sex == "2", 1, 0)
  232. # Add dummy coded scanner
  233. health_wt2brain = cbind(health_wt2brain, dums)
  234. # Fit model
  235. sex_health_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  236. s =~ 0*T1 + T2 + 1*T3
  237. s ~ health + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  238. int ~ health + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  239. T1 ~~ variance*T1
  240. T2 ~~ variance*T2
  241. T3 ~~ variance*T3'
  242. sex_health_Tfitnl <- growth(sex_health_nonlinearmodel, data = health_wt2brain, estimator ='mlr', missing='fiml.x')
  243. summary(sex_health_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  244. # Extract parameter estimates for small values
  245. parameterestimates(sex_health_Tfitnl)$se[7]
  246. parameterestimates(sex_health_Tfitnl)$se[15]
  247. # Surface area
  248. # Dummy code sex
  249. health_ws2brain$sex <- ifelse(health_ws2brain$sex == "2", 1, 0)
  250. # Covert to POMS
  251. # Sample min SA
  252. min_SA <- min(health_ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  253. max_SA <- max(health_ws2brain[, c("T1", "T2", "T3")], na.rm = TRUE)
  254. # Convert
  255. health_ws2brain$T1_POMS <- (health_ws2brain$T1 - min_SA) / (max_SA - min_SA)
  256. health_ws2brain$T2_POMS <- (health_ws2brain$T2 - min_SA) / (max_SA - min_SA)
  257. health_ws2brain$T3_POMS <- (health_ws2brain$T3 - min_SA) / (max_SA - min_SA)
  258. health_ws2brainPOMS = health_ws2brain[,c(1:5, 9:11)]
  259. health_ws2brain <- health_ws2brain[, 1:8]
  260. # Add dummy coded scanner
  261. health_ws2brainPOMS = cbind(health_ws2brainPOMS, dums)
  262. # Fit model
  263. S_sex_health_nonlinearmodel <-
  264. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  265. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  266. s~ health + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  267. int~ health + sex + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  268. T1_POMS ~~ variance*T1_POMS
  269. T2_POMS ~~ variance*T2_POMS
  270. T3_POMS ~~ variance*T3_POMS'
  271. S_sex_health_fitnl <- growth(S_sex_health_nonlinearmodel, data = health_ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  272. summary(S_sex_health_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  273. # Extract parameter estimates for small values
  274. parameterestimates(S_sex_health_fitnl)$est[7]
  275. parameterestimates(S_sex_health_fitnl)$est[15]
  276. parameterestimates(S_sex_health_fitnl)$se[7]
  277. parameterestimates(S_sex_health_fitnl)$se[15]
  278. ######################################################
  279. # Adjusted models including sex, scanner-type, and InR as covariates
  280. ######################################################
  281. # 1. Neighbourhood Disadvantage
  282. ######################################################
  283. # Thickness
  284. # Fit model
  285. I_sex_ND_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  286. s =~ 0*T1 + T2 + 1*T3
  287. s ~ ND + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  288. int ~ ND + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  289. T1 ~~ variance*T1
  290. T2 ~~ variance*T2
  291. T3 ~~ variance*T3'
  292. I_sex_ND_Tfitnl <- growth(I_sex_ND_nonlinearmodel, data = wt2brain, estimator ='mlr', missing='fiml.x')
  293. summary(I_sex_ND_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  294. # Surface area
  295. # Fit model
  296. I_S_sex_ND_nonlinearmodel <-
  297. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  298. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  299. s~ND + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  300. int~ND + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  301. T1_POMS ~~ variance*T1_POMS
  302. T2_POMS ~~ variance*T2_POMS
  303. T3_POMS ~~ variance*T3_POMS'
  304. I_S_sex_ND_fitnl <- growth(I_S_sex_ND_nonlinearmodel, data = ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  305. summary(I_S_sex_ND_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  306. parameterestimates(I_S_sex_ND_fitnl)$se[18]
  307. ######################################################
  308. # 1. Educational Opportunity
  309. ######################################################
  310. # Thickness
  311. # Fit model
  312. I_sex_education_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  313. s =~ 0*T1 + T2 + 1*T3
  314. s ~ education + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  315. int ~ education + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  316. T1 ~~ variance*T1
  317. T2 ~~ variance*T2
  318. T3 ~~ variance*T3'
  319. I_sex_education_Tfitnl <- growth(I_sex_education_nonlinearmodel, data = education_wt2brain, estimator ='mlr', missing='fiml.x')
  320. summary(I_sex_education_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  321. # Extract parameter estimates for smaller values
  322. parameterestimates(I_sex_education_Tfitnl)$se[7]
  323. parameterestimates(I_sex_education_Tfitnl)$se[16]
  324. # Surface area
  325. # Fit model
  326. I_S_sex_education_nonlinearmodel <-
  327. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  328. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  329. s~education + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  330. int~education + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  331. T1_POMS ~~ variance*T1_POMS
  332. T2_POMS ~~ variance*T2_POMS
  333. T3_POMS ~~ variance*T3_POMS'
  334. I_S_sex_education_fitnl <- growth(I_S_sex_education_nonlinearmodel, data = education_ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  335. summary(I_S_sex_education_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  336. # Extract parameter estimates for smaller values
  337. parameterestimates((I_S_sex_education_fitnl))$est[7]
  338. parameterestimates((I_S_sex_education_fitnl))$est[16]
  339. parameterestimates((I_S_sex_education_fitnl))$se[7]
  340. parameterestimates((I_S_sex_education_fitnl))$se[16]
  341. ######################################################
  342. # 1. Health/Environmental Opportunity
  343. ######################################################
  344. # Thickness
  345. # Fit model
  346. I_sex_health_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  347. s =~ 0*T1 + T2 + 1*T3
  348. s ~ health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  349. int ~ health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  350. T1 ~~ variance*T1
  351. T2 ~~ variance*T2
  352. T3 ~~ variance*T3'
  353. I_sex_health_Tfitnl <- growth(I_sex_health_nonlinearmodel, data = health_wt2brain, estimator ='mlr', missing='fiml.x')
  354. summary(I_sex_health_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  355. # Surface area
  356. # Fit model
  357. I_S_sex_health_nonlinearmodel <-
  358. 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  359. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  360. s~ health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  361. int~ health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  362. T1_POMS ~~ variance*T1_POMS
  363. T2_POMS ~~ variance*T2_POMS
  364. T3_POMS ~~ variance*T3_POMS'
  365. I_S_sex_health_fitnl <- growth(I_S_sex_health_nonlinearmodel, data = health_ws2brainPOMS, estimator ='mlr', missing='fiml.x')
  366. summary(I_S_sex_health_fitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  367. # Extract parameter estimates for small values
  368. parameterestimates(I_S_sex_health_fitnl)$est[7]
  369. parameterestimates(I_S_sex_health_fitnl)$est[16]
  370. parameterestimates(I_S_sex_health_fitnl)$se[7]
  371. parameterestimates(I_S_sex_health_fitnl)$se[16]
  372. ######################################################
  373. # Specificity analysis: including 3 neighbourhood factors in one model
  374. ######################################################
  375. # Thickness - new data frame
  376. all_neighbourhood_wtbrain <- wt2brain
  377. all_neighbourhood_wtbrain$education<- education_wt2brain$education
  378. all_neighbourhood_wtbrain$health <- health_wt2brain$health
  379. # Surface area - new data frame
  380. all_neighbourhood_wsbrain <- ws2brainPOMS
  381. all_neighbourhood_wsbrain$education<- education_ws2brainPOMS$education
  382. all_neighbourhood_wsbrain$health <- health_ws2brainPOMS$health
  383. # Check correlations
  384. cor.test(all_neighbourhood_wtbrain$ND, all_neighbourhood_wtbrain$health) #-0.73
  385. cor.test(all_neighbourhood_wtbrain$ND, all_neighbourhood_wtbrain$education) #-0.71
  386. cor.test(all_neighbourhood_wtbrain$education, all_neighbourhood_wtbrain$health) # 0.66
  387. ######################################################
  388. # Thickness
  389. # Fit model
  390. all_neighb_nonlinearmodel <- 'int =~ 1*T1 + 1*T2 + 1*T3
  391. s =~ 0*T1 + T2 + 1*T3
  392. s ~ ND + education + health
  393. int ~ ND + education + health
  394. T1 ~~ variance*T1
  395. T2 ~~ variance*T2
  396. T3 ~~ variance*T3'
  397. all_neighb_Tfitnl <- growth(all_neighb_nonlinearmodel, data = all_neighbourhood_wtbrain, estimator ='mlr', missing='fiml.x')
  398. summary(all_neighb_Tfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  399. parameterestimates(all_neighb_Tfitnl)$est[8]
  400. parameterestimates(all_neighb_Tfitnl)$se[8]
  401. parameterestimates(all_neighb_Tfitnl)$se[9]
  402. parameterestimates(all_neighb_Tfitnl)$se[11]
  403. parameterestimates(all_neighb_Tfitnl)$se[12]
  404. ######################################################
  405. # Adjusting for sex, scanner, income to needs
  406. ######################################################
  407. # Fit model
  408. all_neighb_nonlinearmodel_2 <- 'int =~ 1*T1 + 1*T2 + 1*T3
  409. s =~ 0*T1 + T2 + 1*T3
  410. s ~ ND + education + health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  411. int ~ ND + education + health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  412. T1 ~~ variance*T1
  413. T2 ~~ variance*T2
  414. T3 ~~ variance*T3'
  415. all_neighb_Tfitnl_2 <- growth(all_neighb_nonlinearmodel_2, data = all_neighbourhood_wtbrain, estimator ='mlr', missing='fiml.x')
  416. summary(all_neighb_Tfitnl_2, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  417. # Extract parameter estimates for small values
  418. parameterestimates(all_neighb_Tfitnl_2)$est[8]
  419. parameterestimates(all_neighb_Tfitnl_2)$se[8]
  420. parameterestimates(all_neighb_Tfitnl_2)$se[9]
  421. parameterestimates(all_neighb_Tfitnl_2)$se[19]
  422. parameterestimates(all_neighb_Tfitnl_2)$se[20]
  423. ##############################################################
  424. # Surface area
  425. # Fit model
  426. SA_all_neighb_nonlinearmodel <- 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  427. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  428. s ~ ND + education + health
  429. int ~ ND + education + health
  430. T1_POMS ~~ variance*T1_POMS
  431. T2_POMS ~~ variance*T2_POMS
  432. T3_POMS ~~ variance*T3_POMS'
  433. all_neighb_Sfitnl <- growth(SA_all_neighb_nonlinearmodel, data = all_neighbourhood_wsbrain, estimator ='mlr', missing='fiml.x')
  434. summary(all_neighb_Sfitnl, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  435. # Extract parameter estimates for small values
  436. parameterestimates(all_neighb_Sfitnl)$est[7]
  437. parameterestimates(all_neighb_Sfitnl)$est[8]
  438. parameterestimates(all_neighb_Sfitnl)$est[9]
  439. parameterestimates(all_neighb_Sfitnl)$est[11]
  440. parameterestimates(all_neighb_Sfitnl)$est[12]
  441. parameterestimates(all_neighb_Sfitnl)$se[8]
  442. parameterestimates(all_neighb_Sfitnl)$se[9]
  443. parameterestimates(all_neighb_Sfitnl)$se[11]
  444. parameterestimates(all_neighb_Sfitnl)$se[12]
  445. ######################################################
  446. # Adjusting for sex, scanner, InR
  447. ######################################################
  448. SA_all_neighb_nonlinearmodel_2 <- 'int =~ 1*T1_POMS + 1*T2_POMS + 1*T3_POMS
  449. s =~ 0*T1_POMS + T2_POMS + 1*T3_POMS
  450. s ~ ND + education + health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  451. int ~ ND + education + health + sex + income_to_needs + scanner1 + scanner2 + scanner3 + scanner4 + scanner5 + scanner6
  452. T1_POMS ~~ variance*T1_POMS
  453. T2_POMS ~~ variance*T2_POMS
  454. T3_POMS ~~ variance*T3_POMS'
  455. # Using nonlinear model
  456. all_neighb_Sfitnl_2 <- growth(SA_all_neighb_nonlinearmodel_2, data = all_neighbourhood_wsbrain, estimator ='mlr', missing='fiml.x')
  457. summary(all_neighb_Sfitnl_2, fit.measures = TRUE, rsquare = TRUE, standardized = TRUE)
  458. # Extract parameter estimates for small values
  459. parameterestimates(all_neighb_Sfitnl_2)$est[8]
  460. parameterestimates(all_neighb_Sfitnl_2)$est[9]
  461. parameterestimates(all_neighb_Sfitnl_2)$est[19]
  462. parameterestimates(all_neighb_Sfitnl_2)$est[20]
  463. parameterestimates(all_neighb_Sfitnl_2)$se[8]
  464. parameterestimates(all_neighb_Sfitnl_2)$se[9]
  465. parameterestimates(all_neighb_Sfitnl_2)$se[19]
  466. parameterestimates(all_neighb_Sfitnl_2)$se[20]
  467. ######################################################

Adjusted_Latent_Growth_Models.R, no license · at the source

Overview

Authors: Chloe Carrick1, Divyangana Rakesh2, Lea Michel3, Kathryn Bates1, Delia Fuhrmann1
  1. Department of Psychology, Institute of Psychiatry, Psychology, and Neuroscience, King’s College London, Guy's Campus, Great Maze Pond, London SE1 1UL, United Kingdom
  2. Neuroimaging Department, Institute of Psychiatry, Psychology, and Neuroscience, King’s College London, Centre for Neuroimaging Sciences, De Crespigny Park, Camberwell, London SE5 8AF, United Kingdom
  3. Cognitive Neuroscience Department, Radboud University Medical Center, Nijmegen, The Netherlands
Institutions: King's College London (United Kingdom); Radboud University Nijmegen (Netherlands); Radboud University Medical Center (Netherlands)
Journal: Cerebral cortex (New York, N.Y. : 1991), volume 36, issue 4, article bhag034
Dates: received 21 November 2025; accepted 3 March 2026; published online 7 April 2026; in print April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/cercor/bhag034 · PMID 41955291 · PMCID PMC13064848 · OpenAlex W7152680646
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), developmental (subfield)
Methods: Statistics, Machine learning, Preprocessing
Keywords: ABCD study, adolescence, cortical development, individual differences, neighborhood characteristics
MeSH: Adolescent Development*, Cerebral Cortex*, Individuality*, Neighborhood Characteristics*, Residence Characteristics*, Adolescent, Child, Female, Humans, Longitudinal Studies, Magnetic Resonance Imaging, Male, Neurodevelopment (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: UKRI Medical Research Council (MR/Z506667/1); Medical Research Council (MR/W006820/1); Brain and Behavior Research Foundation (32908)
Citations: not cited yet (Europe PMC); 104 references in the paper

Abstract

Developmental trajectories of adolescent cortical structure differ between individuals. Neighborhood environments are increasingly recognized as influencing this variability. Few studies have examined how multifaceted neighborhood contexts relate to individual changes in cortical maturation patterns. Using 3 waves of neuroimaging data from the ABCD study (n = 11,639 with at least one scan), and latent growth models, the present investigation examined associations between exposure to neighborhood disadvantage and educational, health, and environmental opportunities at ages 9 to 10, and interindividual variability in trajectories of cortical thickness and surface area development between ages 9 and 15. Individuals exposed to disadvantaged neighborhoods showed lower cortical thickness and surface area, and accelerated rates of change in these metrics across adolescence, whereas greater neighborhood opportunities were associated with higher cortical thickness and surface area and a slower pace of change. Our findings indicate interindividual variability in cortical maturational trajectories and provide evidence for the role of neighborhood environments, including positive and negative features, in shaping this variability. This emphasizes the need for future studies examining multiple facets of neighborhood ecologies when examining their influence on adolescent cortical development.

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

OSF avu29

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Languages: R (5)
Size: 7 files, 5 scripts
Software Heritage: not checked
Found in: the text, “Statistical analyses”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: cowplot (5 files), ggplot2 (5 files), lavaan (5 files), psych (5 files), tidyverse (5 files)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
5 files
At the source: osf.io/avu29/

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;
  • 5 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

This study harnessed data from the ABCD study (https://abcdstudy.org/), hosted on the National Institute of Mental Health Data Archive (https://nda.nih.gov/).

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 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 5 keywords, 13 MeSH terms, 3 funders, 101 references.

Cite

This paper

Carrick, C., Rakesh, D., Michel, L., Bates, K., & Fuhrmann, D. (2026). Individual differences in adolescent cortical development are associated with neighborhood characteristics: Longitudinal findings from the ABCD study. Cerebral cortex (New York, N.Y. : 1991), 36(4), bhag034. https://doi.org/10.1093/cercor/bhag034

BibTeX

@article{carrick2026individual,
author = {Carrick, Chloe and Rakesh, Divyangana and Michel, Lea and Bates, Kathryn and Fuhrmann, Delia},
title = {{Individual differences in adolescent cortical development are associated with neighborhood characteristics: Longitudinal findings from the ABCD study}},
journal = {Cerebral cortex (New York, N.Y. : 1991)},
year = {2026},
month = apr,
volume = {36},
number = {4},
pages = {bhag034},
publisher = {Oxford University Press},
issn = {1047-3211},
doi = {10.1093/cercor/bhag034},
url = {https://doi.org/10.1093/cercor/bhag034},
pmid = {41955291},
pmcid = {PMC13064848}
}

RIS

TY - JOUR
AU - Carrick, Chloe
AU - Rakesh, Divyangana
AU - Michel, Lea
AU - Bates, Kathryn
AU - Fuhrmann, Delia
TI - Individual differences in adolescent cortical development are associated with neighborhood characteristics: Longitudinal findings from the ABCD study
T2 - Cerebral cortex (New York, N.Y. : 1991)
J2 - Cereb Cortex
PY - 2026
DA - 2026/04/01
VL - 36
IS - 4
SP - bhag034
SN - 1047-3211
PB - Oxford University Press
DO - 10.1093/cercor/bhag034
UR - https://doi.org/10.1093/cercor/bhag034
LA - en
ER -

CSL-JSON

{
"id": "10.1093/cercor/bhag034",
"type": "article-journal",
"title": "Individual differences in adolescent cortical development are associated with neighborhood characteristics: Longitudinal findings from the ABCD study",
"container-title": "Cerebral cortex (New York, N.Y. : 1991)",
"author": [
{
"family": "Carrick",
"given": "Chloe"
},
{
"family": "Rakesh",
"given": "Divyangana"
},
{
"family": "Michel",
"given": "Lea"
},
{
"family": "Bates",
"given": "Kathryn"
},
{
"family": "Fuhrmann",
"given": "Delia"
}
],
"container-title-short": "Cereb Cortex",
"volume": "36",
"issue": "4",
"page": "bhag034",
"DOI": "10.1093/cercor/bhag034",
"PMID": "41955291",
"PMCID": "PMC13064848",
"ISSN": "1047-3211",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/cercor/bhag034",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
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.1016/j.dcn.2026.101738 [code]
Timing and tempo of puberty and neurodevelopment following adversity: A registered report.
Journal: Developmental cognitive neuroscience
In common: psych, cowplot, ggplot2, 1 other tool, developmental, structural MRI / diffusion, 16 references
[2] doi:10.1038/s41398-026-04143-x [code]
Neighborhood opportunity, white matter, and cognition in a large pediatric neuroimaging study.
Journal: Translational psychiatry
In common: ggplot2, tidyverse, structural MRI / diffusion, 8 references
[3] doi:10.1038/s41398-026-04045-y [code]
Physical-Digital and social-nonsocial extracurricular engagement: differential effects on brain development and psychological outcomes in children.
Journal: Translational psychiatry
In common: lavaan, tidyverse, structural MRI / diffusion, 6 references
[4] doi:10.1038/s41398-026-04010-9 [code]
Bullying victimization and brain development: a longitudinal structural magnetic resonance imaging study from adolescence to early adulthood.
Journal: Translational psychiatry
In common: lavaan, psych, ggplot2, 1 other tool, developmental, structural MRI / diffusion, 3 references
[5] doi:10.7554/elife.108109 [code]
Multimodal MRI marker of cognition explains the association between cognition and mental health in the UK Biobank.
Journal: eLife
In common: lavaan, psych, ggplot2, structural MRI / diffusion, 3 references
[6] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: psych, cowplot, ggplot2, 1 other tool, 3 references
[7] doi:10.1038/s41467-026-73072-6 [code]
Mapping the spatiotemporal continuum of structural connectivity development across the human connectome in youth.
Journal: Nature communications
In common: psych, ggplot2, tidyverse, developmental, structural MRI / diffusion, 3 references
[8] doi:10.1038/s41514-026-00456-9 [code]
Exploring the link between body physiology and cognition: the role of the brain and aging.
Journal: npj aging
In common: lavaan, psych, ggplot2, 1 other tool, 2 references
[9] doi:10.1002/jcv2.70135 [code]
Alterations in resting-state functional connectivity relate to psychopathology trajectories during emerging adolescence.
Journal: JCPP advances
In common: psych, ggplot2, tidyverse, developmental, 3 references
[10] doi:10.1093/pnasnexus/pgag138 [code]
Regretting a chance to connect: How neural responses to missed social opportunities predict self-disclosure.
Journal: PNAS nexus
In common: lavaan, psych, cowplot, 2 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.