Obesity is associated with greater variability of reward signals in the nucleus accumbens.
The 1 match
- [1] § Methods › Data analysis › Behavioral data ↔ TUE002_EAT_trial_based_plots_share.R, lines 25–81 · score 0.50 · reward magnitude, subBED, age, uncertain, food, BMI
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 · 1,101 lines · 41 KB · no license · 1 match
- library(ggplot2)
- library(foreign)
- library(MASS)
- library(cowplot)
- library(viridis)
- library(readxl)
- library(tidyverse)
- library(ggdist)
- library(dplyr)
- library(ggridges)
- library(brms)
- theme_set(theme_cowplot(font_size=12))
- dT <- read.csv("/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/data/TUE002_trial_cue_responses.csv")
- dT_fb <- read.csv("/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/data/TUE002_trial_feedback_responses_more_mvmt.csv")
- dQ <- read_excel("../data/TUE002_Sample_allS1_inclFEV.xlsx")
- d <- read_excel("/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/data/TUE002_S1_incl_diagnosis.xlsx")
- d$rBMI <- rank(d$BMI_S1)
- #Prep TFEQ for plotting
- dQ <-
- dQ %>%
- mutate(
- bTFEQ_Dis = ntile(FEV_disinh, n=4))
- dQ <-
- dQ %>%
- mutate(bTFEQ_Dis = if_else(bTFEQ_Dis>2, bTFEQ_Dis - 1, bTFEQ_Dis))
- dQ$fTFEQ_Dis <- factor(dQ$bTFEQ_Dis, labels = c("Low", "Medium", "High"))
- dT <- merge(x = dT, y = d, by = "ID", all.x=TRUE)
- dT$fBinge <- factor(dT$Group, labels = c('No BE', 'subBED', 'BED'))
- dT$fBMI <- cut(dT$BMI_S1, breaks = c(-100,25,30,'Inf'), labels = c("Normal", "Overweight", "Obese"))
- dT$fMoney <- factor(dT$Money, labels = c("Food","Money"))
- dT$RewMag <- factor(dT$RewardMagnitude, labels = c("Low","High"))
- dT$fUnc <- factor(dT$Uncertainty, labels = c("Certain","Uncertain"))
- dT$cBMI = dT$BMI_S1 - mean(dT$BMI_S1, na.rm = TRUE)
- dT$zBMI = scale(dT$BMI_S1)
- dT$cAge = dT$Age - mean(dT$Age, na.rm = TRUE)
- dT <- merge(x = dT, y = dQ[ , c("ID","FEV_disinh","bTFEQ_Dis","fTFEQ_Dis")], by = "ID", all.x=TRUE)
- dT$cRewM <- dT$RewardMagnitude
- dT$cTFEQ_Dis <- dT$FEV_disinh - mean(dT$FEV_disinh)
- dT <- left_join(dT,d_SD %>% select(ID, Uncertainty,std_Cue_aMTL,std_Cue_pMTL,std_Cue_toMTL))
- dT_fb <- merge(x = dT_fb, y = d, by = "ID", all.x=TRUE)
- dT_fb$fBinge <- factor(dT_fb$Group, labels = c('No BE', 'subBED', 'BED'))
- dT_fb$fBMI <- cut(dT_fb$BMI_S1, breaks = c(-100,25,30,'Inf'), labels = c("Normal", "Overweight", "Obese"))
- dT_fb$fMoney <- factor(dT_fb$Money, labels = c("Food","Money"))
- dT_fb$RewMag <- factor(dT_fb$Reward.Magnitude, labels = c("Low","High"))
- dT_fb$fUnc <- factor(dT_fb$Uncertainty, labels = c("Certain","Uncertain"))
- dT_fb$cBMI = dT_fb$BMI_S1 - mean(dT_fb$BMI_S1, na.rm = TRUE)
- dT_fb$zBMI = scale(dT_fb$BMI_S1)
- dT_fb$cAge = dT$Age - mean(dT_fb$Age, na.rm = TRUE)
- dT_fb <- merge(x = dT_fb, y = dQ[ , c("ID","FEV_disinh","bTFEQ_Dis","fTFEQ_Dis")], by = "ID", all.x=TRUE)
- dT_fb$cRewM <- (dT_fb$Reward.Magnitude-5.5)/4.5
- dT_fb$cTFEQ_Dis <- dT_fb$FEV_disinh - mean(dT_fb$FEV_disinh)
- dT_fb <- left_join(dT_fb,d_SD %>% select(ID, Uncertainty,std_Cue_aMTL,std_Cue_pMTL,std_Cue_toMTL))
- dT_S1_Unc <- read_csv("/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/data/TUE002_grEAT_S1_resid_Unc.csv")
- dT_S1_Cer <- read_csv("/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/data/TUE002_grEAT_S1_resid_Cer.csv")
- dT_S1_Cer$fBinge <- factor(dT_S1_Cer$fBinge)
- dT_S1_Cer$fBinge <- fct_relevel(dT_S1_Cer$fBinge, "No BE")
- dT_S1_Cer$fMoney <- factor(dT_S1_Cer$cRewT, labels = c("Food","Money"))
- dT_S1_Cer$zBMI = scale(dT_S1_Cer$BMI_S1)
- dT_S1_Cer <-
- dT_S1_Cer %>%
- mutate(bTFEQ_Dis = ntile(FEV_disinh, n=4)) %>%
- mutate(bTFEQ_Dis = if_else(bTFEQ_Dis>2, bTFEQ_Dis - 1, bTFEQ_Dis))
- dT_S1_Cer$fTFEQ_Dis <- factor(dT_S1_Cer$bTFEQ_Dis, labels = c("Low", "Medium", "High"))
- dT_S1_Unc$fBinge <- factor(dT_S1_Unc$fBinge)
- dT_S1_Unc$fBinge <- fct_relevel(dT_S1_Unc$fBinge, "No BE","subBED","BED")
- dT_S1_Unc$fMoney <- factor(dT_S1_Unc$cRewT, labels = c("Food","Money"))
- dT_S1_Unc$zBMI = scale(dT_S1_Unc$BMI_S1)
- dT_S1_Unc <-
- dT_S1_Unc %>%
- mutate(bTFEQ_Dis = ntile(FEV_disinh, n=4)) %>%
- mutate(bTFEQ_Dis = if_else(bTFEQ_Dis>2, bTFEQ_Dis - 1, bTFEQ_Dis))
- dT_S1_Unc$fTFEQ_Dis <- factor(dT_S1_Unc$bTFEQ_Dis, labels = c("Low", "Medium", "High"))
- dT_S1_Unc %>%
- dplyr::select(ID,fBinge,BMI_S1,FEV_disinh,Age) %>%
- unique()-> demo
- dT_S1_Cer$cTFEQ_Dis <- dT_S1_Cer$FEV_disinh - mean(dT_S1_Cer$FEV_disinh)
- dT_S1_Unc$cTFEQ_Dis <- dT_S1_Unc$FEV_disinh - mean(dT_S1_Unc$FEV_disinh)
- dT_S1_Cer$certain <- 1
- dT_S1_Unc$certain <- 0
- dT_S1 <- rbind(dT_S1_Cer,dT_S1_Unc)
- #Plots
- #Figure 3
- pF1a <-
- ggplot(aes(x = fBinge,y = Cue_NAcc, fill = fBinge), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#86c8f7','#4a87af','#004c6d')) +
- coord_cartesian(ylim = c(-0.52, 0.52)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 11.0), legend.position = 'none',
- strip.text.x = element_text(margin = margin(0.15,0,0.15,0, "cm")),
- plot.title = element_text(size = 13, hjust = 0.5),
- plot.subtitle = element_text(size = 12, hjust = 0.5))+
- facet_grid(fMoney ~ .) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ggtitle("NAcc cue responses", "Split by reward type") +
- ylab(label = 'Trial residuals') +
- xlab(label = 'Group')
- pF1b <-
- ggplot(aes(x = fBMI,y = Cue_NAcc, fill = fBMI), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#E3D0D8','#aea3b0','#827081')) +
- scale_x_discrete(labels = c("Normal", "Over-\nweight","Obese")) +
- coord_cartesian(ylim = c(-0.52, 0.52)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 11.0), legend.position = 'none',
- strip.text.x = element_text(margin = margin(0.10,0,0.10,0, "cm")))+
- facet_grid(fMoney ~ .) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ylab(label = 'Trial residuals') +
- xlab(label = 'BMI cat')
- pF1c <-
- ggplot(aes(x = fTFEQ_Dis,y = Cue_NAcc, fill = fTFEQ_Dis), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#2AFC98','#16C172','#214F4B')) +
- coord_cartesian(ylim = c(-0.52, 0.52)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 11.0), legend.position = 'none',
- strip.text.x = element_text(margin = margin(0.10,0,0.10,0, "cm")))+
- facet_grid(fMoney ~ .) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ylab(label = 'Trial residuals') +
- xlab(label = 'TFEQ Disinhibition')
- pF1d <-
- ggplot(aes(y = as.factor(rBMI),x = Cue_NAcc, fill = fBinge), data=dT) +
- #stat_halfeye(size = 5, alpha = 0.8) +
- geom_density_ridges(rel_min_height = 0.005, scale = 7, alpha = 0.75, color = 'grey80') +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#86c8f7','#4a87af','#004c6d')) +
- coord_cartesian(xlim = c(-0.52, 0.52)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 11.0), axis.text.y=element_blank(),
- axis.ticks.y=element_blank(), strip.text.x = element_text(margin = margin(0.10,0,0.10,0, "cm")),
- plot.title = element_text(size = 13, hjust = 0.5, margin=margin(0,0,40,0)),
- legend.position = 'none', legend.key.width = unit(1.5, 'cm'),) +
- facet_grid(. ~ fBinge) +
- geom_vline(xintercept = 0, color = 'grey60', linewidth = 0.5) +
- ggtitle('Variability of NAcc cue responses', '') +
- xlab(label = 'Trial residuals') +
- ylab(label = 'ID [ranked by BMI]')
- p1x <- plot_grid(pF1a, pF1b, pF1c, labels = c("b", "c", "d"), label_size = 12,
- ncol=1, rel_heights = c(1.2, 1, 1), align = "v", axis = 1)
- p1 <- plot_grid(pF1d, p1x, labels = c("a", ""), label_size = 12,
- ncol=2, rel_widths = c(1.25, 1), align = "v", axis = 1)
- ggsave("../../Plots/TUE002_EAT_NAccVAR.png",
- plot = p1, height = 8, width = 6.5, units = "in", dpi = 600, bg = "white")
- #Figure 4 dlpfc
- ci_data_Binge <- dT %>%
- group_by(fBinge, fMoney) %>%
- median_qi(Cue_DLPFC, .width = 0.95) %>%
- filter(fBinge=="No BE")
- ci_data_BMI <- dT %>%
- group_by(fBMI, fMoney) %>%
- median_qi(Cue_DLPFC, .width = 0.95) %>%
- filter(fBMI=="Normal")
- ci_data_TFEQ <- dT %>%
- group_by(fTFEQ_Dis, fMoney) %>%
- median_qi(Cue_DLPFC, .width = 0.95) %>%
- filter(fTFEQ_Dis=="Low")
- pF2a <-
- ggplot(aes(x = fBinge,y = Cue_DLPFC, fill = fBinge), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#86c8f7','#4a87af','#004c6d')) +
- geom_hline(data = ci_data_Binge, aes(yintercept = .lower), color = "black", linetype = "dashed", alpha = .5) +
- geom_hline(data = ci_data_Binge, aes(yintercept = .upper), color = "black", linetype = "dashed", alpha = .5) +
- coord_cartesian(ylim = c(-0.7, 0.7)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 12.0), strip.text.x = element_text(margin = margin(0.15,0,0.15,0, "cm")))+
- facet_grid(. ~ fMoney) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ylab(label = 'Variability\ncue responses') +
- xlab(label = 'Group')
- pF2b <-
- ggplot(aes(x = fBMI,y = Cue_DLPFC, fill = fBMI), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#E3D0D8','#aea3b0','#827081')) +
- geom_hline(data = ci_data_BMI, aes(yintercept = .lower), color = "black", linetype = "dashed", alpha = .5) +
- geom_hline(data = ci_data_BMI, aes(yintercept = .upper), color = "black", linetype = "dashed", alpha = .5) +
- coord_cartesian(ylim = c(-0.7, 0.7)) +
- scale_x_discrete(labels = c("Normal", "Over-\nweight","Obese")) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 12.0), strip.text.x = element_text(margin = margin(0.15,0,0.15,0, "cm")))+
- facet_grid(. ~ fMoney) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ylab(label = 'Variability\ncue responses') +
- xlab(label = 'BMI category')
- pF2c <-
- ggplot(aes(x = fTFEQ_Dis,y = Cue_DLPFC, fill = fTFEQ_Dis), data=dT) +
- stat_halfeye(size = 5, alpha = 0.8) +
- scale_fill_manual(guide = guide_legend(title="Group"),values = c('#2AFC98','#16C172','#214F4B')) +
- geom_hline(data = ci_data_TFEQ, aes(yintercept = .lower), color = "black", linetype = "dashed", alpha = .5) +
- geom_hline(data = ci_data_TFEQ, aes(yintercept = .upper), color = "black", linetype = "dashed", alpha = .5) +
- coord_cartesian(ylim = c(-0.7, 0.7)) +
- theme(text = element_text(face = 'bold',size = 12.0),axis.text = element_text(face = 'plain',size = 12.0),
- axis.text.x = element_text(size = 12.0), strip.text.x = element_text(margin = margin(0.15,0,0.15,0, "cm")))+
- facet_grid(. ~ fMoney) +
- geom_hline(yintercept = 0, color = 'grey60', linewidth = 0.5) +
- ylab(label = 'Variability\ncue responses') +
- xlab(label = 'TFEQ Disinhibition')
- p2x <- plot_grid(pF2a, pF2b, pF2c, labels = c("a", "b", "c"), label_size = 12,
- ncol=1, rel_heights = c(1.2, 1, 1), align = "v", axis = 1)
- ggsave("../../Plots/TUE002_EAT_DLPFCVAR.png",
- plot = p2x, height = 8, width = 6.5, units = "in", dpi = 600, bg = "white")
- #brms
- b1.10a <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 5000, warmup = 2000, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc")
- b1.10b <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 5000, warmup = 2000, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_aMTL_DVARS")
- b1.10bb <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + std_Cue_aMTL + log_FD + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 5000, warmup = 2000, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_moremvmt_aMTL_logFD")
- b1.10da<-
- brm(data = dT_fb,
- family = gaussian,
- bf(Feedback_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 5000, warmup = 2000, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Feedback_NAcc_moremvmt_aMTL")
- b1.10d<-
- brm(data = dT_fb,
- family = gaussian,
- bf(Feedback_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + std_Cue_aMTL + log_FD + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 5000, warmup = 2000, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Feedback_NAcc_moremvmt_aMTL_logFD")
- dT_Unc <- filter(dT, Uncertainty ==1)
- dT_Cer <- filter(dT, Uncertainty ==0)
- b1.2a <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_Unc")
- b1.2a <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_Unc_aMTL")
- b1.3 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + scale(SD_resRelEff) + scale(SD_resR_Want) + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_Cer_SDz")
- b1.7 <-
- brm(data = dT_fb,
- family = gaussian,
- bf(Feedback_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Feedback_NAcc_fDis")
- b1.7a <-
- brm(data = dT_fb,
- family = gaussian,
- bf(Feedback_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM + std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Feedback_NAcc_fDis_aMTL")
- b1.7b <-
- brm(data = dT_fb,
- family = gaussian,
- bf(Feedback_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM + std_Cue_aMTL + logFD + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Feedback_NAcc_fDis_aMTL_logFD")
- b1.8 <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM +std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_fDis_Unc_aMTL")
- print(summary(b1.8), digits = 3)
- b1.9 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_NAcc ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM +std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_NAcc_fDis_Cer_aMTL")
- print(summary(b1.9), digits = 3)
- b2.0 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + log_FD + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_aMTL")
- b2.0a <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + lstd_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_aMTL")
- b2.0b <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + log_FD +std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_aMTL_logFD")
- print(summary(b2.0), digits = 3)
- b2.1 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + scale(SD_resRelEff) + scale(SD_resR_Want) + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_SDz")
- print(summary(b2.1), digits = 3)
- b2.2 <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_Unc")
- print(summary(b2.2), digits = 3)
- b2.3 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_Cer")
- print(summary(b2.3), digits = 3)
- b2.7 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_fDisL")
- b2.7a <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_DLPFC ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fTFEQ_Dis + zBMI) * fMoney * cRewM +std_Cue_aMTL + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_DLPFC_fDis_aMTL")
- print(summary(b2.7), digits = 3)
- b3.1 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_toMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_toMTL")
- print(summary(b3.1), digits = 3)
- b4.1 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_aMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_aMTL")
- print(summary(b4.1), digits = 3)
- b5.1 <-
- brm(data = dT,
- family = gaussian,
- bf(Cue_pMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_pMTL")
- print(summary(b5.1), digits = 3)
- b3.2 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_toMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_toMTL_Cer")
- print(summary(b3.2), digits = 3)
- b4.2 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_aMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_aMTL_Cer")
- print(summary(b4.2), digits = 3)
- b5.2 <-
- brm(data = dT_Cer,
- family = gaussian,
- bf(Cue_pMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_pMTL_Cer")
- print(summary(b5.2), digits = 3)
- b3.3 <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_toMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_toMTL_Unc")
- print(summary(b3.3), digits = 3)
- b4.3 <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_aMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_aMTL_Unc")
- print(summary(b4.3), digits = 3)
- b5.3 <-
- brm(data = dT_Unc,
- family = gaussian,
- bf(Cue_pMTL ~ 1 + (1 |i| ID),
- sigma ~ 1 + (fBinge + zBMI) * fMoney * cRewM + (1 + fMoney + cRewM |i| ID)),
- prior = c(prior(normal(0, 0.2), class = Intercept),
- prior(normal(0, 1), class = Intercept, dpar = sigma),
- prior(normal(0, 0.2), class = b, dpar = sigma),
- prior(exponential(1), class = sd, dpar = sigma),
- prior(lkj(2), class = cor)),
- iter = 4000, warmup = 800, chains = 4, cores = 4,
- seed = 14,
- sample_prior = TRUE,
- file = "/mnt/big_data/SynologyDrive/Paper/drafts/TUE002_EATVAR/analysis/brms_AK/b1.Cue_pMTL_Unc")
- print(summary(b5.3), digits = 3)
- #Behavioral data analysis variance ratio tests
- dEAT_S1U <- dT_S1_Unc
- n_boot <- 1000
- unique_ids <- unique(dEAT_S1U$ID)
- conditions <- unique(dEAT_S1U$Money)
- group_id_list <- dEAT_S1U %>%
- distinct(ID, fBinge) %>%
- group_split(fBinge)
- #Wanting
- # Step 1: Compute observed variance ratios (Group C vs A)
- observed_variances <- dEAT_S1U %>%
- group_by(fBinge, Money) %>%
- summarise(Variance = var(resR_Want), .groups = "drop")
- observed_ratios <- observed_variances %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- pivot_wider(names_from = fBinge, values_from = Variance) %>%
- mutate(VarRatio_CvsA = subBED/`No BE`)
- observed_combined_variances <- dEAT_S1U %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- group_by(fBinge) %>%
- summarise(Variance = var(resR_Want), .groups = "drop")
- observed_combined_ratio <- observed_combined_variances %>%
- pivot_wider(names_from = fBinge, values_from = Variance) %>%
- mutate(VarRatio_CvsA = subBED / `No BE`) %>%
- pull(VarRatio_CvsA)
- # Step 2: Bootstrapping
- #bootstrap_var_results <- vector("list", n_boot)
- variance_ratios <- data.frame()
- set.seed(123)
- for (i in 1:n_boot) {
- sampled_ids <- group_id_list %>%
- lapply(function(group_df) {
- sample(group_df$ID, size = nrow(group_df), replace = TRUE)
- }) %>%
- unlist()
- boot_data <- dEAT_S1U %>%
- semi_join(data.frame(ID = sampled_ids), by = "ID")
- var_summary <- boot_data %>%
- group_by(fBinge, Money) %>%
- summarise(Variance = var(resR_Want), .groups = "drop")
- # Calculate ratios for each Money
- for (cond in conditions) {
- var_C <- var_summary %>% filter(fBinge == "subBED", Money == cond) %>% pull(Variance)
- var_A <- var_summary %>% filter(fBinge == "No BE", Money == cond) %>% pull(Variance)
- var_ratio <- if (length(var_C) == 1 && length(var_A) == 1 && var_A != 0) var_C / var_A else NA
- variance_ratios <- rbind(variance_ratios, data.frame(
- Bootstrap = i,
- Money = cond,
- VarRatio_CvsA = var_ratio
- ))
- }
- boot_combined_var <- boot_data %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- group_by(fBinge) %>%
- summarise(Variance = var(resR_Want), .groups = "drop")
- if (all(c("No BE", "subBED") %in% boot_combined_var$fBinge)) {
- var_C <- boot_combined_var %>% filter(fBinge == "subBED") %>% pull(Variance)
- var_A <- boot_combined_var %>% filter(fBinge == "No BE") %>% pull(Variance)
- var_ratio_combined <- ifelse(var_A != 0, var_C / var_A, NA)
- } else {
- var_ratio_combined <- NA
- }
- # Store combined ratio
- variance_ratios <- rbind(variance_ratios, data.frame(
- Bootstrap = i,
- Money = "Combined",
- VarRatio_CvsA = var_ratio_combined
- ))
- }
- # Step 3: Significance testing (2-sided p-values)
- # Function to compute 2-sided p-value
- two_sided_p <- function(boot_dist, obs_val) {
- mean(boot_dist <= 1, na.rm = TRUE)
- }
- # Individual condition p-values
- # Final p-value computation
- p_values <- variance_ratios %>%
- group_by(Money) %>%
- mutate(
- Observed = case_when(
- Money == "Combined" ~ observed_combined_ratio,
- TRUE ~ observed_ratios$VarRatio_CvsA[match(Money, observed_ratios$Money)]
- ),
- P_value = two_sided_p(VarRatio_CvsA, Observed)
- ) %>%
- select(Money,P_value) %>%
- unique()
- print(p_values)
- #effort
- n_boot <- 1000
- unique_ids <- unique(dEAT_S1U$ID)
- conditions <- unique(dEAT_S1U$Money)
- group_id_list <- dEAT_S1U %>%
- distinct(ID, fBinge) %>%
- group_split(fBinge)
- # Step 1: Compute observed variance ratios (Group C vs A)
- observed_variances <- dEAT_S1U %>%
- group_by(fBinge, Money) %>%
- summarise(Variance = var(resRelEff), .groups = "drop")
- observed_ratios <- observed_variances %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- pivot_wider(names_from = fBinge, values_from = Variance) %>%
- mutate(VarRatio_CvsA = subBED/`No BE`)
- observed_combined_variances <- dEAT_S1U %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- group_by(fBinge) %>%
- summarise(Variance = var(resRelEff), .groups = "drop")
- observed_combined_ratio <- observed_combined_variances %>%
- pivot_wider(names_from = fBinge, values_from = Variance) %>%
- mutate(VarRatio_CvsA = subBED / `No BE`) %>%
- pull(VarRatio_CvsA)
- # Step 2: Bootstrapping
- #bootstrap_var_results <- vector("list", n_boot)
- variance_ratios <- data.frame()
- set.seed(108)
- for (i in 1:n_boot) {
- sampled_ids <- group_id_list %>%
- lapply(function(group_df) {
- sample(group_df$ID, size = nrow(group_df), replace = TRUE)
- }) %>%
- unlist()
- boot_data <- dEAT_S1U %>%
- semi_join(data.frame(ID = sampled_ids), by = "ID")
- var_summary <- boot_data %>%
- group_by(fBinge, Money) %>%
- summarise(Variance = var(resRelEff), .groups = "drop")
- # Calculate ratios for each Money
- for (cond in conditions) {
- var_C <- var_summary %>% filter(fBinge == "subBED", Money == cond) %>% pull(Variance)
- var_A <- var_summary %>% filter(fBinge == "No BE", Money == cond) %>% pull(Variance)
- var_ratio <- if (length(var_C) == 1 && length(var_A) == 1 && var_A != 0) var_C / var_A else NA
- variance_ratios <- rbind(variance_ratios, data.frame(
- Bootstrap = i,
- Money = cond,
- VarRatio_CvsA = var_ratio
- ))
- }
- boot_combined_var <- boot_data %>%
- filter(fBinge %in% c("No BE", "subBED")) %>%
- group_by(fBinge) %>%
- summarise(Variance = var(resRelEff), .groups = "drop")
- if (all(c("No BE", "subBED") %in% boot_combined_var$fBinge)) {
- var_C <- boot_combined_var %>% filter(fBinge == "subBED") %>% pull(Variance)
- var_A <- boot_combined_var %>% filter(fBinge == "No BE") %>% pull(Variance)
- var_ratio_combined <- ifelse(var_A != 0, var_C / var_A, NA)
- } else {
- var_ratio_combined <- NA
- }
- # Store combined ratio
- variance_ratios <- rbind(variance_ratios, data.frame(
- Bootstrap = i,
- Money = "Combined",
- VarRatio_CvsA = var_ratio_combined
- ))
- }
- # Step 3: Significance testing (2-sided p-values)
- # Function to compute 2-sided p-value
- two_sided_p <- function(boot_dist, obs_val) {
- mean(boot_dist <= 1, na.rm = TRUE)
- }
- two_sided_p <- function(boot_dist, obs_val) {
- mean(abs(boot_dist - obs) >= abs(obs_val - 1), na.rm = TRUE)
- }
- # Individual condition p-values
- # Final p-value computation
- p_values <- variance_ratios %>%
- group_by(Money) %>%
- mutate(
- Observed = case_when(
- Money == "Combined" ~ observed_combined_ratio,
- TRUE ~ observed_ratios$VarRatio_CvsA[match(Money, observed_ratios$Money)]
- ),
- P_value = two_sided_p(VarRatio_CvsA, Observed)
- ) %>%
- select(Money,P_value) %>%
- unique()
- print(p_values)
- #bootstrap correlation with BMI
- correlation_fn <- function(data, indices) {
- d <- data[indices, ]
- return(cor(d$cBMI, d$SD_resRelEff, method = "pearson"))
- }
- # Run bootstrap with 1000 resamples
- results_resRelEff <- boot(data = dAgg_S1U, statistic = correlation_fn, R = 1000)
- # View results
- print(results_resRelEff)
- # 95% Confidence interval
- boot.ci(results_resRelEff, type = "perc")
- correlation_fn <- function(data, indices) {
- d <- data[indices, ]
- return(cor(d$cBMI, d$SD_resR_Want, method = "pearson"))
- }
- # Run bootstrap with 1000 resamples
- results_resRWant <- boot(data = dAgg_S1U, statistic = correlation_fn, R = 1000)
- # View results
- print(results_resRWant)
- # 95% Confidence interval
- boot.ci(results_resRWant, type = "perc")
TUE002_EAT_trial_based_plots_share.R, no license · at the source
Overview
- Department of Psychiatry and Psychotherapy, Tübingen Center for Mental Health, University of Tübingen,Tübingen, Germany
- Department of Psychology, Tübingen Center for Mental Health, University of Tübingen,Tübingen, Germany
- Section of Medical Psychology, Department of Psychiatry and Psychotherapy, University Hospital Bonn, University of Bonn,Bonn, Germany
- German Center for Mental Health (DZPG), partner site Tübingen,Tübingen, Germany
- LEAD Graduate School & Research Network, University of Tübingen,Tübingen, Germany
- German Center for Diabetes Research (DZD),Neuherberg, Germany
Abstract
Binge eating disorder (BED) is characterized by repeated episodes of binge eating accompanied by a loss of control. Although the neurobiological underpinnings of binge eating (BE) episodes are not fully understood, there are indications that variability in nucleus accumbens (NAcc) responses could lead to increased variability in food intake. Here, we assessed whether BED is associated with higher intra-individual variability in behavioral and neuroimaging indices of reward responses. To this end, patients with BED (n = 35, MBMI = 33.2 kg/
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 tewpn
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
1 file
- TUE002_EAT_trial_based_p
lots_share.R , R, 1,101 lines, 1 match
Code availability
Trial-wise data (estimated cue responses and behavior) and analysis code are available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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;
- 1 script, 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 availability
Trial-wise data (estimated cue responses and behavior) is available at 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, issue, pages, dates, 6 authors, 4 keywords, 10 MeSH terms, 1 funder, 80 references.
Cite
This paper
van den Hoek Ostende, M. M., Kühnel, A., Neuser, M. P., Dresler, T., Svaldi, J., & Kroemer, N. B. (2026). Obesity is associated with greater variability of reward signals in the nucleus accumbens. Translational psychiatry, 16(1), 370. https://
BibTeX
@article{vandenhoekosten
author = {van den Hoek Ostende, Mechteld M. and Kühnel, Anne and Neuser, Monja P. and Dresler, Thomas and Svaldi, Jennifer and Kroemer, Nils B.},
title = {{Obesity is associated with greater variability of reward signals in the nucleus accumbens}},
journal = {Translational psychiatry},
year = {2026},
month = jul,
volume = {16},
number = {1},
pages = {370},
publisher = {Nature Publishing Group},
issn = {2158-3188},
doi = {10.1038/
url = {https://
pmid = {42477311},
pmcid = {PMC13385738}
}
RIS
TY - JOUR
AU - van den Hoek Ostende, Mechteld M.
AU - Kühnel, Anne
AU - Neuser, Monja P.
AU - Dresler, Thomas
AU - Svaldi, Jennifer
AU - Kroemer, Nils B.
TI - Obesity is associated with greater variability of reward signals in the nucleus accumbens
T2 - Translational psychiatry
J2 - Transl Psychiatry
PY - 2026
DA - 2026/
VL - 16
IS - 1
SP - 370
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Obesity is associated with greater variability of reward signals in the nucleus accumbens",
"container-title": "Translational psychiatry",
"author": [
{
"family": "van den Hoek Ostende",
"given": "Mechteld M."
},
{
"family": "Kühnel",
"given": "Anne"
},
{
"family": "Neuser",
"given": "Monja P."
},
{
"family": "Dresler",
"given": "Thomas"
},
{
"family": "Svaldi",
"given": "Jennifer"
},
{
"family": "Kroemer",
"given": "Nils B."
}
],
"container-title-short":
"volume": "16",
"issue": "1",
"page": "370",
"DOI": "10.1038/
"PMID": "42477311",
"PMCID": "PMC13385738",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
20
]
]
}
}
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.1111/infa.70114 [code]
- Statistics in Motion: Does the Infant Motor System Predict Actions Based on Their Transitional Probability?Journal: Infancy : the official journal of the International Society on Infant StudiesIn common: brms, cowplot, tidyverse, 3 references
- [2] doi:10.1093/cercor/bhag032 [code]
- Pulvinar-posterior superior temporal sulcus connectivity contributes to non-conscious emotion processing in affective blindsight.Journal: Cerebral cortex (New York, N.Y. : 1991)In common: brms, cowplot, ggplot2, 1 other tool, other condition, 1 reference
- [3] doi:10.1162/imag.a.1258 [code]
- Non-specific increase in alpha power during a neurofeedback session targeting its downregulation.Journal: Imaging neuroscience (Cambridge, Mass.)In common: brms, cowplot, ggplot2, 1 other tool, 1 reference
- [4] doi:10.1038/s44271-026-00431-w [code]
- Alpha power increases spontaneously during a neurofeedback session.Journal: Communications psychologyIn common: brms, cowplot, ggplot2, 1 other tool, 1 reference
- [5] doi:10.1038/s41598-026-53424-4 [code]
- Cognitive control networks causally support implicit emotion regulation: evidence from dlPFC stimulation and directed functional connectivity.Journal: Scientific reportsIn common: brms, cowplot, ggplot2, 1 other tool, 1 reference
- [6] doi:10.3758/s13415-026-01417-1 [code]
- Computational signatures of exertion and rest underlie moment-to-moment dynamics of subjective perceptions of effort and fatigue.Journal: Cognitive, affective & behavioral neuroscienceIn common: 4 references
- [7] doi:10.1162/nol.a.266 [code]
- The Role of the Anterior Temporal Lobe in Reading: An HD-tDCS Study.Journal: Neurobiology of language (Cambridge, Mass.)In common: brms, ggplot2, tidyverse, 2 references
- [8] doi:10.1162/opmi.a.372 [code]
- Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients.Journal: Open mind : discoveries in cognitive scienceIn common: brms, ggplot2, tidyverse, clinical / translational, 1 reference
- [9] doi:10.1111/psyp.70285 [code]
- Spontaneous Modulation of Alpha Power During a Neurofeedback Session Without Instructions.Journal: PsychophysiologyIn common: brms, cowplot, tidyverse, 1 reference
- [10] doi:10.1016/j.cell.2026.05.047 [code]
- An emergent disease-associated motor neuron state precedes cell death in ALS.Journal: CellIn common: cowplot, ggplot2, tidyverse, other condition, 2 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, 1 script, 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:24e6c409b1c2d85e…
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.
