Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial.
The 1 match
- [1] § Results › Baseline subiculum volume predicts change in MDT-OS performance › Demographic factors and cardiovascular fitness do not explain bivariate relationships ↔ code/3_hc-md_bivariate-LCSM.R, lines 345–413 · score 0.52 · pseudo LCSM, vo2peak, CFI, RMSEA, bivariate, Fit
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 · 417 lines · 26 KB · no license · 1 match
- # -------------------------------------------------------------------------
- # Program: 3_hc-md_bivariate-LCSM.R
- # Author: Sarah E. Polk
- # Date: 2024-08-22 15:00:54 CEST
- #
- # This script sets up bilateral LCSMs in OpenMx to test for baseline-baseline,
- # baseline-change, and change-change associations across bilateral hippocampal
- # subfield volume and MDT-OS performance
- #
- # -------------------------------------------------------------------------
- # Prepare environment -----------------------------------------------------
- library(OpenMx)
- library(tidyverse)
- # Set paths ---------------------------------------------------------------
- path.base <- file.path("your", "base", "path")
- path.data <- file.path(path.base, "data")
- path.results <- file.path(path.base, "results")
- # Functions ---------------------------------------------------------------
- # get bootstrapped parameters and perform Wald test
- getStdParam <- function(params, param) {
- b <- round((params %>% filter(label == param))$Std.Value[1], 3)
- se <- round((params %>% filter(label == param))$Boot.SE[1], 3)
- z <- round(b / se, 3)
- p <- round(2*pnorm(abs(z), lower.tail = F), 3)
- return(paste0("b = ", b, " [", round(b - (se * 1.96), 3), ", ", round(b + (se * 1.96), 3), "], z = ", z, ", p = ", p))
- }
- getStdParam.noBoot <- function(params, param) {
- b <- round((params %>% filter(label == param))$Std.Value[1], 3)
- se <- round((params %>% filter(label == param))$Std.SE[1], 3)
- z <- round(b / se, 3)
- p <- round(2*pnorm(abs(z), lower.tail = F), 3)
- return(paste0("b = ", b, " [", round(b - (se * 1.96), 3), ", ", round(b + (se * 1.96), 3), "], z = ", z, ", p = ", p))
- }
- # Get data ----------------------------------------------------------------
- data <- read.csv(file.path(path.data, "data_hc-md_clean-std.csv"))
- results.invar.hc <- read.csv(file.path(path.results, "invariance_hc.csv"))
- results.invar.mdt <- read.csv(file.path(path.results, "invariance_mdt.csv"))
- # Build bivariate LCSMs for bilateral hippocampal volume and MDT ----------
- vars.hc <- c("CA12", "CA3DG", "Sub", "ERC")
- vars.mdt <- "MDT"
- # set up list to save results
- results.biLCSM <- vector(mode = "list", length = 0)
- results.biLCSM.covar <- vector(mode = "list", length = 0)
- results.biLCSM.vo2peak <- vector(mode = "list", length = 0)
- seed <- 234
- nrep <- 400
- extraTries <- 100
- for (i in 1:length(vars.hc)){
- hc.cur <- vars.hc[i]
- mdt.cur <- vars.mdt
- print(hc.cur)
- data.cur <- data %>%
- select(id, spanish, exercise, combined,
- paste0(hc.cur, "_Left_1"), paste0(hc.cur, "_Right_1"),
- paste0(hc.cur, "_Left_2"), paste0(hc.cur, "_Right_2"),
- paste0(hc.cur, "_Left_3"), paste0(hc.cur, "_Right_3"),
- paste0(mdt.cur, "_Parcel1_1"), paste0(mdt.cur, "_Parcel2_1"), paste0(mdt.cur, "_Parcel3_1"),
- paste0(mdt.cur, "_Parcel1_2"), paste0(mdt.cur, "_Parcel2_2"), paste0(mdt.cur, "_Parcel3_2"),
- paste0(mdt.cur, "_Parcel1_3"), paste0(mdt.cur, "_Parcel2_3"), paste0(mdt.cur, "_Parcel3_3"))
- # set up model
- manifests.hc <- names(data.cur)[5:10]
- manifests.mdt <- names(data.cur)[11:19]
- latents.hc <- c("HC_1", "HC_2", "HC_3", "Delta_HC_12", "Delta_HC_23")
- latents.mdt <- c("MDT_1", "MDT_2", "MDT_3", "Delta_MDT_12", "Delta_MDT_23")
- result.invar.hc <- (results.invar.hc %>% filter(roi == hc.cur))$time.strict
- ifelse(result.invar.hc > .050,
- residuals.hc <- rep(c("RES_Left","RES_Right"), 3),
- residuals.hc <- paste("RES", manifests.hc, sep = "_"))
- resCov.hc <- "COV_hemi"
- result.invarMetric.mdt <- (results.invar.mdt %>% filter(roi == mdt.cur))$time.metric
- ifelse(result.invarMetric.mdt > .050,
- loadings.mdt <- rep(paste("LOAD", c(1:3), sep = "_"), 3),
- loadings.mdt <- c(paste(rep(paste("LOAD", c(1:3), sep = "_"), 3), "1", sep = "_"),
- paste(rep(paste("LOAD", c(1:3), sep = "_"), 3), "2", sep = "_"),
- paste(rep(paste("LOAD", c(1:3), sep = "_"), 3), "3", sep = "_"))
- )
- result.invarStrict.mdt <- (results.invar.mdt %>% filter(roi == mdt.cur))$time.strict
- ifelse(result.invarMetric.mdt > .050 & result.invarStrict.mdt > .050,
- residuals.mdt <- "RES",
- residuals.mdt <- paste("RES", c(rep("_1", 3),
- rep("_2", 3),
- rep("_3", 3))))
- lbound <- .00001
- set.seed(seed)
- bivarLCSM <- mxModel(model = "bivarLCSM",
- type = "RAM",
- manifestVars = c(manifests.hc, manifests.mdt),
- latentVars = c(latents.hc, latents.mdt),
- # set up subfield LCSM
- # loadings
- mxPath(from = "HC_1", to = manifests.hc[grep("_1", manifests.hc)], arrows = 1, free = F, values = 1),
- mxPath(from = "HC_2", to = manifests.hc[grep("_2", manifests.hc)], arrows = 1, free = F, values = 1),
- mxPath(from = "HC_3", to = manifests.hc[grep("_3", manifests.hc)], arrows = 1, free = F, values = 1),
- # residual variance and covariance
- mxPath(from = manifests.hc, arrows = 2, free = T, values = .1, lbound = lbound, labels = residuals.hc),
- mxPath(from = manifests.hc[grep("Left", manifests.hc)[1]], to = manifests.hc[grep("Left", manifests.hc)[2:3]], arrows = 2, free = T, values = .2, labels = resCov.hc),
- mxPath(from = manifests.hc[grep("Left", manifests.hc)[2]], to = manifests.hc[grep("Left", manifests.hc)[3]], arrows = 2, free = T, values = .2, labels = resCov.hc),
- mxPath(from = manifests.hc[grep("Right", manifests.hc)[1]], to = manifests.hc[grep("Right", manifests.hc)[2:3]], arrows = 2, free = T, values = .2, labels = resCov.hc),
- mxPath(from = manifests.hc[grep("Right", manifests.hc)[2]], to = manifests.hc[grep("Right", manifests.hc)[3]], arrows = 2, free = T, values = .2, labels = resCov.hc),
- # latent structure
- mxPath(from = c("HC_1", "Delta_HC_12"), to = "HC_2", arrows = 1, free = F, values = 1),
- mxPath(from = c("HC_2", "Delta_HC_23"), to = "HC_3", arrows = 1, free = F, values = 1),
- mxPath(from = c("HC_1", "Delta_HC_12", "Delta_HC_23"), arrows = 2, free = T, values = .8, lbound = lbound, labels = paste("VAR", c("HC_1", "Delta_HC", "Delta_HC"), sep = "_")),
- mxPath(from = "HC_1", to = c("Delta_HC_12", "Delta_HC_23"), arrows = 2, free = T, values = 0, labels = c("COV_HC_1_Delta_HC_12", "COV_HC_1_Delta_HC_23")),
- mxPath(from = "Delta_HC_12", to = "Delta_HC_23", arrows = 2, free = T, values = 0, labels = "COV_Delta_HC_12_Delta_HC_23"),
- # group means
- mxPath(from = "one", to = c("HC_1", "Delta_HC_12", "Delta_HC_23"), arrows = 1, free = T, values = 0, labels = paste("M", c("HC_1", "Delta_HC", "Delta_HC"), sep = "_")),
- # set up MDT LCSM
- # loadings
- mxPath(from = "MDT_1", to = manifests.mdt[grep("_1", manifests.mdt)], arrows = 1, free = c(F, T, T), values = 1, labels = loadings.mdt[1:3]),
- mxPath(from = "MDT_2", to = manifests.mdt[grep("_2", manifests.mdt)], arrows = 1, free = c(F, T, T), values = 1, labels = loadings.mdt[4:6]),
- mxPath(from = "MDT_3", to = manifests.mdt[grep("_3", manifests.mdt)], arrows = 1, free = c(F, T, T), values = 1, labels = loadings.mdt[7:9]),
- # residual variance
- mxPath(from = manifests.mdt, arrows = 2, free = T, values = .1, lbound = lbound, labels = residuals.mdt),
- # latent structure
- mxPath(from = c("MDT_1", "Delta_MDT_12"), to = "MDT_2", arrows = 1, free = F, values = 1),
- mxPath(from = c("MDT_2", "Delta_MDT_23"), to = "MDT_3", arrows = 1, free = F, values = 1),
- mxPath(from = c("MDT_1", "Delta_MDT_12", "Delta_MDT_23"), arrows = 2, free = T, values = .8, lbound = lbound, labels = paste("VAR", c("MDT_1", "Delta_MDT", "Delta_MDT"), sep = "_")),
- mxPath(from = "MDT_1", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 2, free = T, values = 0, labels = c("COV_MDT_1_Delta_MDT_12", "COV_MDT_1_Delta_MDT_23")),
- mxPath(from = "Delta_MDT_12", to = "Delta_MDT_23", arrows = 2, free = T, values = 0, labels = "COV_Delta_MDT_12_Delta_MDT_23"),
- # group means
- mxPath(from = "one", to = c("MDT_1", "Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0, labels = paste("M", c("MDT_1", "Delta_MDT", "Delta_MDT"), sep = "_")),
- # set up bivariate structure
- # baseline-baseline
- mxPath(from = "MDT_1", to = "HC_1", arrows = 2, free = T, values = .05, labels = "COV_Baseline"),
- # baseline MDT-change hc
- mxPath(from = "MDT_1", to = c("Delta_HC_12", "Delta_HC_23"), arrows = 1, free = T, values = 0, labels = "MDT_Baseline_Delta_HC"),
- # baseline hc-change MDT
- mxPath(from = "HC_1", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0, labels = "HC_Baseline_Delta_MDT"),
- # change-change
- mxPath(from = "Delta_MDT_12", to = "Delta_HC_12", arrows = 2, free = T, values = 0, labels = "COV_Delta"),
- mxPath(from = "Delta_MDT_23", to = "Delta_HC_23", arrows = 2, free = T, values = 0, labels = "COV_Delta"))
- # fit model and print results with fit indices
- model.bivarLCSM <- mxModel(model = bivarLCSM,
- name = "bivarLCSM",
- mxData(observed = data.cur, type = "raw"))
- fit.bivarLCSM <- mxTryHard(model.bivarLCSM, extra = extraTries)
- ref.bivarLCSM <- mxRefModels(fit.bivarLCSM, run = T)
- print(fitIndices <- summary(fit.bivarLCSM, refModels = ref.bivarLCSM))
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["CFI"] <- round(fitIndices$CFI, 3)
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["RMSEA"] <- paste0(round(fitIndices$RMSEA, 3),
- " [", round(fitIndices[["RMSEACI"]][["lower"]], 3), ", ",
- round(fitIndices[["RMSEACI"]][["upper"]], 3), "]")
- # bootstrap model and get parameters
- boot.bivarLCSM <- mxBootstrap(fit.bivarLCSM, nrep)
- bootStd.bivarLCSM <- mxBootstrapStdizeRAMpaths(boot.bivarLCSM)
- # baseline-baseline
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["COV_Baseline"] <- getStdParam(bootStd.bivarLCSM, "COV_Baseline")
- # mdt baseline predicting hc change
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["MDT_Baseline_Delta_HC"] <- getStdParam(bootStd.bivarLCSM, "MDT_Baseline_Delta_HC")
- # hc baseline predicting mdt change
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM, "HC_Baseline_Delta_MDT")
- # change-change
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["COV_Delta"] <- getStdParam(bootStd.bivarLCSM, "COV_Delta")
- # subiculum baseline predicts mdt change
- # test for difference across non-exercisers and exercisers
- p <- as.numeric(str_sub(getStdParam(bootStd.bivarLCSM, "HC_Baseline_Delta_MDT"), -4, -1))
- if (p < .050){
- data.noExercise <- data.cur %>% filter(exercise == 0)
- data.exercise <- data.cur %>% filter(exercise == 1)
- model.bivarLCSM.noExercise <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_noEx",
- mxData(observed = data.noExercise, type = "raw"))
- model.bivarLCSM.exercise <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_ex",
- mxData(observed = data.exercise, type = "raw"))
- model.bivarLCSM.groupsEqual <- mxModel(model = "bivarLCSM_groupsEqual",
- model.bivarLCSM.noExercise,
- model.bivarLCSM.exercise,
- mxFitFunctionMultigroup(c("bivarLCSM_noEx",
- "bivarLCSM_ex")))
- fit.bivarLCSM.groupsEqual <- mxTryHard(model.bivarLCSM.groupsEqual, extra = extraTries)
- model.bivarLCSM.noExercise <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_noEx",
- mxPath(from = "HC_1", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0, labels = "HC_Baseline_Delta_MDT_noEx"),
- mxData(observed = data.noExercise, type = "raw"))
- model.bivarLCSM.exercise <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_ex",
- mxPath(from = "HC_1", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0, labels = "HC_Baseline_Delta_MDT_ex"),
- mxData(observed = data.exercise, type = "raw"))
- model.bivarLCSM.groupsInequal <- mxModel(model = "bivarLCSM_groupsInequal",
- model.bivarLCSM.noExercise,
- model.bivarLCSM.exercise,
- mxFitFunctionMultigroup(c("bivarLCSM_noEx",
- "bivarLCSM_ex")))
- fit.bivarLCSM.groupsInequal <- mxTryHard(model.bivarLCSM.groupsInequal, extra = extraTries)
- # test equality across groups
- lrt.groupsEqual <- mxCompare(fit.bivarLCSM.groupsInequal, fit.bivarLCSM.groupsEqual)
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT LRT exercise"] <- paste("chi2 =", round(lrt.groupsEqual$diffLL[2], 3),
- "p =", round(lrt.groupsEqual$p[2], 3))
- # get parameters
- std.bivarLCSM.groupsInequal <- mxStandardizeRAMpaths(fit.bivarLCSM.groupsInequal, SE = T)
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT no exercise"] <- getStdParam.noBoot(do.call(rbind, std.bivarLCSM.groupsInequal), "HC_Baseline_Delta_MDT_noEx")
- results.biLCSM[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT exercise"] <- getStdParam.noBoot(do.call(rbind, std.bivarLCSM.groupsInequal), "HC_Baseline_Delta_MDT_ex")
- }
- # add age, sex, and education to the model
- data.cur <- data %>%
- select(id, age, sex, eduYrs,
- paste0(hc.cur, "_Left_1"), paste0(hc.cur, "_Right_1"),
- paste0(hc.cur, "_Left_2"), paste0(hc.cur, "_Right_2"),
- paste0(hc.cur, "_Left_3"), paste0(hc.cur, "_Right_3"),
- paste0(mdt.cur, "_Parcel1_1"), paste0(mdt.cur, "_Parcel2_1"), paste0(mdt.cur, "_Parcel3_1"),
- paste0(mdt.cur, "_Parcel1_2"), paste0(mdt.cur, "_Parcel2_2"), paste0(mdt.cur, "_Parcel3_2"),
- paste0(mdt.cur, "_Parcel1_3"), paste0(mdt.cur, "_Parcel2_3"), paste0(mdt.cur, "_Parcel3_3"))
- model.bivarLCSM.covar <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_covars",
- manifestVars = c("age", "sex", "eduYrs"),
- mxPath(from = "age", to = c("HC_1", "Delta_HC_12", "Delta_HC_23", "MDT_1", "Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0,
- labels = paste("age", c("HC_1", "Delta_HC", "Delta_HC", "MDT_1", "Delta_MDT", "Delta_MDT"), sep = "_")),
- mxPath(from = "sex", to = c("HC_1", "Delta_HC_12", "Delta_HC_23", "MDT_1", "Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0,
- labels = paste("sex", c("HC_1", "Delta_HC", "Delta_HC", "MDT_1", "Delta_MDT", "Delta_MDT"), sep = "_")),
- mxPath(from = "eduYrs", to = c("HC_1", "Delta_HC_12", "Delta_HC_23", "MDT_1", "Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0,
- labels = paste("edu", c("HC_1", "Delta_HC", "Delta_HC", "MDT_1", "Delta_MDT", "Delta_MDT"), sep = "_")),
- mxPath(from = c("age", "sex", "eduYrs"), arrows = 2, free = T, values = 1, lbound = lbound, labels = paste("VAR", c("age", "sex", "edu"), sep = "_")),
- mxData(observed = data.cur, type = "raw"))
- fit.bivarLCSM.covar <- mxTryHard(model.bivarLCSM.covar, extra = extraTries)
- ref.bivarLCSM.covar <- mxRefModels(fit.bivarLCSM.covar, run = T)
- print(fitIndices <- summary(fit.bivarLCSM.covar, refModels = ref.bivarLCSM.covar))
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["CFI"] <- round(fitIndices$CFI, 3)
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["RMSEA"] <- paste0(round(fitIndices$RMSEA, 3),
- " [", round(fitIndices[["RMSEACI"]][["lower"]], 3), ", ",
- round(fitIndices[["RMSEACI"]][["upper"]], 3), "]")
- # bootstrap model and get parameters
- boot.bivarLCSM.covar <- mxBootstrap(fit.bivarLCSM.covar, nrep)
- bootStd.bivarLCSM.covar <- mxBootstrapStdizeRAMpaths(boot.bivarLCSM.covar)
- # age
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["age_HC_1"] <- getStdParam(bootStd.bivarLCSM.covar, "age_HC_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["age_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.covar, "age_Delta_HC")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["age_MDT_1"] <- getStdParam(bootStd.bivarLCSM.covar, "age_MDT_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["age_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.covar, "age_Delta_MDT")
- # sex
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["sex_HC_1"] <- getStdParam(bootStd.bivarLCSM.covar, "sex_HC_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["sex_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.covar, "sex_Delta_HC")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["sex_MDT_1"] <- getStdParam(bootStd.bivarLCSM.covar, "sex_MDT_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["sex_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.covar, "sex_Delta_MDT")
- # edu
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["edu_HC_1"] <- getStdParam(bootStd.bivarLCSM.covar, "edu_HC_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["edu_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.covar, "edu_Delta_HC")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["edu_MDT_1"] <- getStdParam(bootStd.bivarLCSM.covar, "edu_MDT_1")
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["edu_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.covar, "edu_Delta_MDT")
- # baseline-baseline
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["COV_Baseline"] <- getStdParam(bootStd.bivarLCSM.covar, "COV_Baseline")
- # mdt baseline predicting hc change
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["MDT_Baseline_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.covar, "MDT_Baseline_Delta_HC")
- # hc baseline predicting mdt change
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.covar, "HC_Baseline_Delta_MDT")
- # change-change
- results.biLCSM.covar[[paste0(hc.cur, "~MDT")]]["COV_Delta"] <- getStdParam(bootStd.bivarLCSM.covar, "COV_Delta")
- # add VO2Peak to the model
- data.cur <- data %>%
- select(id, VO2Peak_1, VO2Peak_3,
- paste0(hc.cur, "_Left_1"), paste0(hc.cur, "_Right_1"),
- paste0(hc.cur, "_Left_2"), paste0(hc.cur, "_Right_2"),
- paste0(hc.cur, "_Left_3"), paste0(hc.cur, "_Right_3"),
- paste0(mdt.cur, "_Parcel1_1"), paste0(mdt.cur, "_Parcel2_1"), paste0(mdt.cur, "_Parcel3_1"),
- paste0(mdt.cur, "_Parcel1_2"), paste0(mdt.cur, "_Parcel2_2"), paste0(mdt.cur, "_Parcel3_2"),
- paste0(mdt.cur, "_Parcel1_3"), paste0(mdt.cur, "_Parcel2_3"), paste0(mdt.cur, "_Parcel3_3"))
- model.bivarLCSM.vo2peak <- mxModel(model = bivarLCSM,
- name = "bivarLCSM_vo2peak",
- manifestVars = c("VO2Peak_1", "VO2Peak_3"),
- latentVars = "Delta_VO2Peak",
- # pseudo-LCSM
- mxPath(from = c("VO2Peak_1", "Delta_VO2Peak"), to = "VO2Peak_3", arrows = 1, free = F, values = 1),
- mxPath(from = "VO2Peak_1", to = "Delta_VO2Peak", arrows = 2, free = T, values = 0, labels = "COV_VO2Peak_1_Delta_VO2Peak"),
- mxPath(from = "one", to = c("VO2Peak_1", "Delta_VO2Peak"), arrows = 1, free = T, values = c(-.2, .2), labels = paste("M", c("VO2Peak_1", "Delta_VO2Peak"), sep = "_")),
- mxPath(from = "one", to = "VO2Peak_3", arrows = 1, free = F, values = 0),
- mxPath(from = c("VO2Peak_1", "Delta_VO2Peak"), arrows = 2, free = T, values = .5, lbound = lbound, labels = c("RES_VO2Peak_1", "VAR_Delta_VO2Peak")),
- # HC
- mxPath(from = "VO2Peak_1", to = "HC_1", arrows = 2, free = T, values = .2, labels = c("COV_VO2Peak_1_HC_1")),
- mxPath(from = "HC_1", to = "Delta_VO2Peak", arrows = 1, free = T, values = 0, labels = "HC_1_Delta_VO2Peak"),
- mxPath(from = "VO2Peak_1", to = c("Delta_HC_12", "Delta_HC_23"), arrows = 1, free = T, values = 0, labels = c("VO2Peak_1_Delta_HC")),
- mxPath(from = "Delta_VO2Peak", to = c("Delta_HC_12", "Delta_HC_23"), arrows = 2, free = T, values = .2, labels = "COV_Delta_VO2Peak_Delta_HC"),
- # MDT
- mxPath(from = "VO2Peak_1", to = "MDT_1", arrows = 2, free = T, values = .2, labels = c("COV_VO2Peak_1_MDT_1")),
- mxPath(from = "MDT_1", to = "Delta_VO2Peak", arrows = 1, free = T, values = 0, labels = "MDT_1_Delta_VO2Peak"),
- mxPath(from = "VO2Peak_1", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 1, free = T, values = 0, labels = c("VO2Peak_1_Delta_MDT")),
- mxPath(from = "Delta_VO2Peak", to = c("Delta_MDT_12", "Delta_MDT_23"), arrows = 2, free = T, values = .2, labels = "COV_Delta_VO2Peak_Delta_MDT"),
- mxData(observed = data.cur, type = "raw"))
- fit.bivarLCSM.vo2peak <- mxTryHard(model.bivarLCSM.vo2peak, extra = extraTries)
- ref.bivarLCSM.vo2peak <- mxRefModels(fit.bivarLCSM.vo2peak, run = T)
- print(fitIndices <- summary(fit.bivarLCSM.vo2peak, refModels = ref.bivarLCSM.vo2peak))
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["CFI"] <- round(fitIndices$CFI, 3)
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["RMSEA"] <- paste0(round(fitIndices$RMSEA, 3),
- " [", round(fitIndices[["RMSEACI"]][["lower"]], 3), ", ",
- round(fitIndices[["RMSEACI"]][["upper"]], 3), "]")
- # bootstrap model and get parameters
- boot.bivarLCSM.vo2peak <- mxBootstrap(fit.bivarLCSM.vo2peak, nrep)
- bootStd.bivarLCSM.vo2peak <- mxBootstrapStdizeRAMpaths(boot.bivarLCSM.vo2peak)
- # vo2peak
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_VO2Peak_1_HC_1"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_VO2Peak_1_HC_1")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["HC_1_Delta_VO2Peak"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "HC_1_Delta_VO2Peak")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["VO2Peak_1_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "VO2Peak_1_Delta_HC")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_Delta_VO2Peak_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_Delta_VO2Peak_Delta_HC")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_VO2Peak_1_MDT_1"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_VO2Peak_1_MDT_1")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["MDT_1_Delta_VO2Peak"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "MDT_1_Delta_VO2Peak")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["VO2Peak_1_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "VO2Peak_1_Delta_MDT")
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_Delta_VO2Peak_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_Delta_VO2Peak_Delta_MDT")
- # baseline-baseline
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_Baseline"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_Baseline")
- # mdt baseline predicting hc change
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["MDT_Baseline_Delta_HC"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "MDT_Baseline_Delta_HC")
- # hc baseline predicting mdt change
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["HC_Baseline_Delta_MDT"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "HC_Baseline_Delta_MDT")
- # change-change
- results.biLCSM.vo2peak[[paste0(hc.cur, "~MDT")]]["COV_Delta"] <- getStdParam(bootStd.bivarLCSM.vo2peak, "COV_Delta")
- }
- # Format results and save -------------------------------------------------
- results.biLCSM.format <- data.frame(results = unlist(results.biLCSM))
- write.csv(results.biLCSM.format, file.path(path.results, "results_bivarLCSM.csv"), row.names = T)
- results.biLCSM.covar.format <- data.frame(results = unlist(results.biLCSM.covar))
- write.csv(results.biLCSM.covar.format, file.path(path.results, "results_bivarLCSM_covars.csv"), row.names = T)
- results.biLCSM.vo2peak.format <- data.frame(results = unlist(results.biLCSM.vo2peak))
- write.csv(results.biLCSM.vo2peak.format, file.path(path.results, "results_bivarLCSM_vo2peak.csv"), row.names = T)
3_hc-md_bivariate-LCSM.R, no license · at the source
Overview
- Center for Lifespan Psychology, Max Planck Institute for Human Development, Berlin, Germany
- Clinical Cognitive Neuroscience, DZNE German Center for Neurodegenerative Diseases, Magdeburg, Germany
- Department of Psychology, University of Trier, Trier, Germany
- Friede Springer Cardiovascular Prevention Center, Charité – Universitätsmedizin Berlin, Berlin, Germany
- Department of Psychology, MSB Medical School Berlin, Berlin, Germany
- Max Planck UCL Centre for Computational Psychiatry and Ageing Research, Berlin, Germany
- Lise Meitner Group for Environmental Neuroscience, Max Planck Institute for Human Development, Berlin, Germany
- Department of Psychiatry and Psychotherapy, University Clinic Hamburg-Eppendorf, Hamburg, Germany
- Institute for Mind, Brain and Behavior, HMU Health and Medical University, Potsdam, Germany
Abstract
Protecting hippocampal structures, such as the cornu ammonis 3 and dentate gyrus (CA3/
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 1 match between paragraphs and lines of code.
OSF mz83w
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
4 files
- code/
1_hc-md_testInvariance.R , R, 506 lines - code/
2_hc-md_LCSM-moderator.R , R, 435 lines - code/
3_hc-md_bivariate-LCSM.R , R, 417 lines, 1 match - README.txt, Text, 20 lines
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;
- 3 scripts, each with its path and the digest of its content;
- 1 match 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 and Code Availability
Data and code are available on OSF (view-only link: https://
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, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 8 authors, 5 keywords, 1 funder, 107 references.
Cite
This paper
Polk, S. E., Fandakova, Y., Berron, D., Düzel, S., Brandmaier, A. M., Kühn, S., Lindenberger, U., & Wenger, E. (2026). Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1306. https://
BibTeX
@article{polk2026benefic
author = {Polk, Sarah E. and Fandakova, Yana and Berron, David and Düzel, Sandra and Brandmaier, Andreas M. and Kühn, Simone and Lindenberger, Ulman and Wenger, Elisabeth},
title = {{Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jul,
volume = {4},
pages = {IMAG.a.1306},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/
url = {https://
pmid = {42516172},
pmcid = {PMC13403954}
}
RIS
TY - JOUR
AU - Polk, Sarah E.
AU - Fandakova, Yana
AU - Berron, David
AU - Düzel, Sandra
AU - Brandmaier, Andreas M.
AU - Kühn, Simone
AU - Lindenberger, Ulman
AU - Wenger, Elisabeth
TI - Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/
VL - 4
SP - IMAG.a.1306
SN - 2837-6056
PB - MIT Press
DO - 10.1162/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1162/
"type": "article-journal",
"title": "Beneficial effects of foreign language learning and aerobic exercise on dentate gyrus volume and mnemonic discrimination in healthy older adults: Results from a randomized controlled trial",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Polk",
"given": "Sarah E."
},
{
"family": "Fandakova",
"given": "Yana"
},
{
"family": "Berron",
"given": "David"
},
{
"family": "Düzel",
"given": "Sandra"
},
{
"family": "Brandmaier",
"given": "Andreas M."
},
{
"family": "Kühn",
"given": "Simone"
},
{
"family": "Lindenberger",
"given": "Ulman"
},
{
"family": "Wenger",
"given": "Elisabeth"
}
],
"container-title-short":
"volume": "4",
"page": "IMAG.a.1306",
"DOI": "10.1162/
"PMID": "42516172",
"PMCID": "PMC13403954",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
24
]
]
}
}
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.1162/imag.a.1242 [code]
- Stable individual differences dominate adult brain volume variation until later life.Journal: Imaging neuroscience (Cambridge, Mass.)In common: 1 reference, 3 authors
- [2] 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: tidyverse, 7 references
- [3] doi:10.1162/imag.a.1302 [code]
- Five-year associations among dopamine D2-like receptor loss, cognitive decline, education, and self-reported leisure activities in healthy older adults.Journal: Imaging neuroscience (Cambridge, Mass.)In common: tidyverse, 6 references
- [4] doi:10.1038/s41514-026-00439-w [code]
- Effects of a three-month exercise programme on cognition, mood and neurogenesis: the NeuroFit randomised controlled trial.Journal: npj agingIn common: tidyverse, 4 references
- [5] doi:10.1002/dneu.70019 [code]
- A Longitudinal Study of Children's Hippocampal Development: Investigating Maternal Physical Activity, Depression, and Education.Journal: Developmental neurobiologyIn common: 4 references
- [6] doi:10.7554/elife.109461 [code]
- The effect of physical activity on brain structure and cognitive function in the population-based cohort of LIFE-Adult Study.Journal: eLifeIn common: tidyverse, 3 references
- [7] doi:10.1038/s41593-026-02289-x [code]
- Cerebellar aging is spatially heterogeneous and supports cognitive resilience in later life.Journal: Nature neuroscienceIn common: tidyverse, 3 references
- [8] doi:10.1002/brb3.71666
- Principal Components Analysis Relates Hippocampal Trisynaptic Circuit to Vividness of Visual Mental Imagery.Journal: Brain and behaviorIn common: 3 references
- [9] doi:10.1111/ejn.70576
- Enhanced Contour-Deviant Mismatch Negativity and Mnemonic Representations in Older Musicians.Journal: The European journal of neuroscienceIn common: 3 references
- [10] doi:10.1038/s41467-026-74957-2 [code]
- Joint trajectories of brain atrophy, white matter hyperintensities and cognition quantify brain maintenance.Journal: Nature communicationsIn common: 3 references
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, 3 scripts, and 1 match 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:5dc52dcb8e01ee0e…
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
[.
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.
