OSCR

Plastic brain mechanisms supporting reduction in cravings induced by response training.

Code ↔ Paper

10 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 10 matches
  1. [1] § Materials and Methods › Analysis plan › H2) Training-induced modifications of implicit wanting of the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 138 to 182 · score 0.85 · double interaction term, pre training session, implicit wanting, post compared, subject ANOVA, post training · Report a mismatch
  2. [2] § Materials and Methods › Analysis plan › HR) Training-induced modifications of explicit liking of the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 52 to 92 · score 0.81 · double interaction term, pre training session, post compared, subject ANOVA, post training, modification · Report a mismatch
  3. [3] § Materials and Methods › Analysis plan › H3) Moderating effect of learning biases on the reduction in “NoGo” cues explicit liking ↔ Registered Report Material/SCRIPTS/main.R, lines 227 to 276 · score 0.74 · Forced Choice task, error rate, learning biases, H3a, delta, Pavlovian · Report a mismatch
  4. [4] § Results › H2) Training-induced modifications of implicit wanting of the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 184 to 225 · score 0.65 · partial Cohen, implicit wanting, homoscedasticity assumption, Levene, BF01, minimal · Report a mismatch
  5. [5] § Results › H3) Moderating effect of learning biases on the reduction in “NoGo” cues explicit liking ↔ Registered Report Material/SCRIPTS/main.R, lines 227 to 276 · score 0.61 · affective learning bias, Pavlovian bias, delta explicit, pre post, biases, model · Report a mismatch
  6. [6] § Materials and Methods › Analysis plan › H1) Modifications in the global field power and/or topography of the event-related potentials to the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 52 to 92 · score 0.58 · double interaction, interaction term, post training, hypothesis, NoGo, Modifications · Report a mismatch
  7. [7] § Results › HR) Training-induced modifications of explicit liking of the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 94 to 136 · score 0.58 · partial Cohen, homoscedasticity assumption, Levene, BF01, minimal, HR · Report a mismatch
  8. [8] § Materials and Methods › Analysis plan › H3) Moderating effect of learning biases on the reduction in “NoGo” cues explicit liking ↔ Registered Report Material/SCRIPTS/main.R, lines 278 to 318 · score 0.52 · regression coefficient, learning bias, H3b, delta, pre post, model · Report a mismatch
  9. [9] § Materials and Methods › Analysis plan › H1) Modifications in the global field power and/or topography of the event-related potentials to the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 138 to 182 · score 0.52 · double interaction term, post training, NoGo, ANOVA, Modifications, pre · Report a mismatch
  10. [10] § Materials and Methods › Analysis plan › H2) Training-induced modifications of implicit wanting of the “NoGo” trained cues ↔ Registered Report Material/SCRIPTS/main.R, lines 184 to 225 · score 0.50 · RT.Away, implicit wanting, IW, H2, NoGo · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 496 lines · 23 KB · no license · 10 matches

  1. # ----- Prep Session --------------------------------------------------------------
  2. # Install packages if not already installed then Load packages
  3. packages <- c("tidyverse","rstatix","BayesFactor","nparLD","effsize","lme4","scales","car","DescTools", "rapidsplithalf")
  4. new.packages <- packages[!(packages %in% installed.packages()[,"Package"])]
  5. if(length(new.packages)) install.packages(new.packages)
  6. invisible(lapply(packages, library, character.only = TRUE))
  7. rm(packages, new.packages)
  8. set.seed(1000)
  9. # ----- Load data --------------------------------------------------------------
  10. ## Paths
  11. data_path = 'DATA/main.csv'
  12. figure_path = 'RESULTS/'
  13. ## Load data
  14. df = read.csv2(data_path, sep=',', dec = ".")
  15. df$sbj = as.factor(df$sbj)
  16. df$condition = as.factor(df$condition)
  17. df$session = factor(df$session, levels = c("pre", "post"))
  18. # ----- Functions --------------------------------------------------------------
  19. ## Outlier exclusion function with dynamic column name (default threshold = 2.5)
  20. tag_outliers <- function(df, grouping_variable = c("condition","session"), input_variable, threshold_factor = 2.5) {
  21. # parsing the variables from vectors to symbols and dataframe environments
  22. grouping_variable_sym = syms(grouping_variable)
  23. input_variable_sym = sym(input_variable)
  24. grouping_variable_df = mget(grouping_variable, as.environment(df))
  25. input_variable_df = mget(input_variable, as.environment(df))
  26. # finding the mad threshold values
  27. threshold <- df %>% group_by(!!!grouping_variable_sym) %>% summarise(med = median(!!input_variable_sym, na.rm = T),
  28. mad = mad(!!input_variable_sym, na.rm = T),
  29. lowbound = med-mad*threshold_factor,
  30. upbound = med+mad*threshold_factor)
  31. # parsing the grouping variable into a dataframe environment
  32. grouping_variable_thr = mget(grouping_variable, as.environment(threshold))
  33. # indexing the group of thresholds
  34. groupIndex = match(interaction(grouping_variable_df), interaction(grouping_variable_thr))
  35. # tagging the outliers
  36. df$outlier = array(input_variable_df > threshold[groupIndex,"upbound"] | input_variable_df < threshold[groupIndex,"lowbound"])
  37. return(df)
  38. }
  39. etas2f <- function(etas){sqrt(etas / (1- etas))}
  40. # ----- Descriptives -----------------------------------------------------------
  41. ## Remove participant with only first session for all hypotheses
  42. df = df %>%
  43. group_by(sbj) %>%
  44. filter(n_distinct(session) > 1) %>%
  45. ungroup()
  46. ## Baseline explicit liking on included participants (n=60)
  47. mean(df$liking, na.rm=TRUE)
  48. sd(df$liking, na.rm=TRUE)
  49. # ----- Main Analysis ----------------------------------------------------------
  50. ###################################################################################
  51. # HR) Training-induced modifications of explicit liking of the "NoGo" trained cues
  52. ###################################################################################
  53. ## ---- Pre-processing ---
  54. ### Outliers removal
  55. df.liking = tag_outliers(df,c("condition","session"), "liking") # tag the outlier for liking at pre-post and Go-NoGo
  56. df.liking %>% group_by(condition, session) %>% summarise(n = length(sbj),
  57. n.na = sum(is.na(liking)),
  58. n.outlier = sum(outlier, na.rm=T))
  59. ### Identify subjects with any outlier records and create a data frame for exclusion
  60. outlier_subjects <- df.liking %>%
  61. filter(outlier == TRUE) %>% # Find all rows marked as outlier
  62. distinct(sbj) %>% # Get distinct subjects with outliers
  63. mutate(to_exclude = TRUE) # Add a column to mark them for exclusion
  64. ### Filter out these subjects from the original data frame
  65. df.liking <- df.liking %>%
  66. anti_join(outlier_subjects, by = "sbj")
  67. df.liking %>% group_by(session, condition) %>% summarise(mu = mean(liking, na.rm = T),
  68. sd = sd(liking, na.rm = T),
  69. n = sum(!is.na(liking)))
  70. ## ---- Inferential statistics ----
  71. # Modification in the participants’ average explicit liking of the “NoGo” trained items
  72. # assessed with the double interaction term of a Session (pre-, post-training) x Item Category (“Go”, “NoGo”) within-subject ANOVA.
  73. # We expect a larger reduction of explicit liking for “NoGo” than “Go” items at the post- compared to the pre-training session.
  74. ### Homoscedasticity assumption
  75. leveneTest(liking ~ session*condition, data=df.liking) # F[3, 220] = 0.28, p = .838
  76. ### Repeated measures ANOVA
  77. aov.liking = anova_test(data = df.liking, dv = liking, wid = sbj,
  78. within = c(session, condition), effect.size = "pes") # F[1,55] = 8.41, p = 0.005
  79. ### Partial Cohen’s f
  80. etas2f(aov.liking$pes[3]) # partial Cohen’s f = 0.39
  81. ### Add bayesian factors
  82. BF.liking = anovaBF(liking ~ condition*session + sbj, data = df.liking[!is.na(df.liking$liking), ], whichRandom = "sbj")
  83. BF01 = BF.liking[3] / BF.liking[4] # BF01 = 0.80713 ±7.23%
  84. ## ---- Plot----
  85. ggplot(df.liking, aes(x=session, y=liking, fill=session)) +
  86. facet_wrap(~ condition, labeller = as_labeller(c("go" = "Go", "nogo" = "NoGo"))) + # splitting by condition
  87. geom_violin() + geom_boxplot(width = 0.2) +
  88. geom_line(aes(group = sbj), size = 0.6, alpha = 0.6, color = "grey20") +
  89. geom_point(aes(color = session), size = 1.5, alpha = 0.4, color = 'grey20') +
  90. scale_fill_manual(values = c("lightblue", "darkcyan")) +
  91. stat_summary(fun = mean, geom = "point",
  92. shape = 21, size = 3, stroke = 1.2,
  93. color = "grey20", fill = "grey20") +
  94. labs(y = "explicit liking (%)", x = "") +
  95. theme_minimal() + theme(text = element_text(size = 14),
  96. strip.text.x = element_text(face="bold"),
  97. legend.text = element_text(face="bold"),
  98. axis.text.x = element_blank(),
  99. axis.ticks.x = element_blank(),
  100. plot.title = element_text(face = "bold"))
  101. ggsave(paste0(figure_path, 'HR_valuation.tiff'), dpi = 350,width = 4.63,height = 4.58) # 4.63 x 4.58 in image
  102. ## ---- Interaction summary & t-tests ----
  103. ### Interaction summary
  104. interaction_summary <- df.liking %>%
  105. group_by(session, condition) %>%
  106. summarise(mean_liking = mean(liking, na.rm = TRUE),
  107. SD = sd(liking, na.rm = TRUE),
  108. .groups = 'drop') %>%
  109. pivot_wider(names_from = session, values_from = mean_liking, names_prefix = "Session_")
  110. print(interaction_summary)
  111. ## T-test pre-post NoGo
  112. df.liking.nogo = df.liking %>%
  113. filter(condition == "nogo") %>%
  114. group_by(session)
  115. t.test(df.liking.nogo$liking[df.liking.nogo$session == "pre"],
  116. df.liking.nogo$liking[df.liking.nogo$session == "post"],
  117. paired = TRUE)
  118. ## T-test pre-post Go
  119. df.liking.go = df.liking %>%
  120. filter(condition == "go") %>%
  121. group_by(session)
  122. t.test(df.liking.go$liking[df.liking.go$session == "pre"],
  123. df.liking.go$liking[df.liking.go$session == "post"],
  124. paired = TRUE)
  125. ###################################################################################
  126. # H2) Training-induced modifications of implicit wanting of the “NoGo” trained cues
  127. ###################################################################################
  128. ## ---- Pre-processing ----
  129. df.iw = tag_outliers(df,c("condition","session"), "IW") # tag the outlier for IW at pre-post and Go-NoGo
  130. df.iw %>% group_by(condition, session) %>% summarise(n = sum(outlier, na.rm=T))
  131. df.iw %>% group_by(condition, session) %>% summarise(n = length(sbj),
  132. n.na = sum(is.na(IW)),
  133. n.outlier = sum(outlier, na.rm=T))
  134. ### Identify subjects with any outlier records and create a data frame for exclusion
  135. outlier_subjects <- df.iw %>%
  136. filter(outlier == TRUE) %>% # Find all rows marked as outlier
  137. distinct(sbj) %>% # Get distinct subjects with outliers
  138. mutate(to_exclude = TRUE) # Add a column to mark them for exclusion
  139. ### Filter out these subjects from the original data frame
  140. df.iw <- df.iw %>%
  141. anti_join(outlier_subjects, by = "sbj")
  142. df.iw %>% group_by(session, condition) %>% summarise(mu = mean(IW, na.rm = T),
  143. sd = sd(IW, na.rm = T),
  144. n = sum(!is.na(IW)))
  145. ## ---- Inferential statistics ----
  146. # Modification in the participants’ average IW of the “NoGo” trained items
  147. # assessed with the double interaction term of a Session (pre-, post-training) x Item Category (“Go”, “NoGo”) within-subject ANOVA.
  148. # We expect a larger reduction of IW for “NoGo” than “Go” items at the post- compared to the pre-training session.
  149. ### Homoscedasticity assumption
  150. leveneTest(IW ~ session*condition, data=df.iw) # F[3, 204] = 1.82, p = .144
  151. ### Repeated measures ANOVA
  152. aov.iw = anova_test(data = df.iw, dv = IW, wid = sbj,
  153. within = c(session, condition), effect.size = "pes") # F[1,55] = 8.41, p = 0.005
  154. ### Partial Cohen’s f
  155. etas2f(aov.iw$pes[3]) # partial Cohen's f = 0.02
  156. # Add bayesian factors
  157. BF.iw = anovaBF(IW ~ condition*session + sbj, data = df.iw, whichRandom = "sbj")
  158. BF01 = BF.iw[3] / BF.iw[4] # BF01 = 5.437177 ±7.88%
  159. ## ---- Plot ----
  160. ggplot(df.iw, aes(x=session, y=IW, fill=session)) +
  161. facet_wrap(~ condition, labeller = as_labeller(c("go" = "Go", "nogo" = "NoGo"))) + # splitting by condition
  162. geom_violin() + geom_boxplot(width = 0.2) +
  163. geom_line(aes(group = sbj), size = 0.6, alpha = 0.6, color = "grey20") +
  164. geom_point(aes(color = session), size = 1.5, alpha = 0.4, color = 'grey20') +
  165. scale_fill_manual(values = c("lightblue", "darkcyan")) +
  166. stat_summary(fun = mean, geom = "point",
  167. shape = 21, size = 3, stroke = 1.2,
  168. color = "grey20", fill = "grey20") +
  169. labs(y = "implicit wanting (RT.Away-RT.Towards) (s)", x = "") +
  170. theme_minimal() + theme(text = element_text(size = 14),
  171. strip.text.x = element_text(face="bold"),
  172. legend.text = element_text(face="bold"),
  173. axis.text.x = element_blank(),
  174. axis.ticks.x = element_blank(),
  175. plot.title = element_text(face = "bold"))
  176. ggsave(paste0(figure_path, 'H2_iw.tiff'), dpi = 350, width = 4.63,height = 4.58)
  177. ## ---- Interaction summary & t-tests ----
  178. ### Interaction summary
  179. interaction_summary <- df.iw %>%
  180. group_by(session, condition) %>%
  181. summarise(mean_iw = mean(IW, na.rm = TRUE),
  182. SD = sd(IW, na.rm = TRUE),
  183. .groups = 'drop') %>%
  184. pivot_wider(names_from = session, values_from = mean_iw, names_prefix = "Session_")
  185. print(interaction_summary)
  186. ### T-test pre-post NoGo
  187. df.iw.nogo = df.iw %>%
  188. filter(condition == "nogo") %>%
  189. group_by(session)
  190. t.test(df.iw.nogo$IW[df.iw.nogo$session == "pre"],
  191. df.iw.nogo$IW[df.iw.nogo$session == "post"],
  192. paired = TRUE)
  193. ### T-test pre-post Go
  194. df.iw.go = df.iw %>%
  195. filter(condition == "go") %>%
  196. group_by(session)
  197. t.test(df.iw.go$IW[df.iw.go$session == "pre"],
  198. df.iw.go$IW[df.iw.go$session == "post"],
  199. paired = TRUE)
  200. #####################################################################################################
  201. # H3) Moderating effect of affective learning biases on the reduction in “NoGo” cues explicit liking
  202. #####################################################################################################
  203. ## ---- Pre-processing ----
  204. ### Pre-Post reduction of explicit liking in the NoGo items. Cohen's d must be >= 0.4
  205. CohenD(df$liking[df$session == "pre" & df$condition == "nogo"],
  206. df$liking[df$session == "post" & df$condition == "nogo"], na.rm = T) # Cohen's D = 0.78
  207. ### Pivot the data frame into ∆ explicit liking
  208. df.H3 <- df[, c("sbj", "session", "condition", "liking", "beta1", 'error_rate_fc', "w")]
  209. df.H3 <- df.H3 %>% filter(condition == "nogo") %>%
  210. pivot_wider(names_from = session, values_from = liking) %>% # Pivoting session columns into 'pre' and 'post'
  211. mutate(delta_explicit_liking = pre - post) # Compute ∆ as pre-post explicit liking
  212. ### Remove error rate above 10% in forced choice task
  213. df.H3 = df.H3 %>% filter(error_rate_fc <= 0.1)
  214. ### Tagging the outlier for the ∆ explicit liking
  215. df.H3 = tag_outliers(df.H3,"condition","delta_explicit_liking") # tag the outliers for the ∆ explicit liking
  216. df.H3 = rename(df.H3, outlier.delta = outlier) # rename the variable to keep it without replacing it afterward
  217. ## ---- H3a) Learning bias as Pavlovian bias ----
  218. ### --- Pre-processing ---
  219. ### Tagged outliers removal
  220. df.pav = tag_outliers(df.H3,"condition", "beta1") # tag the outlier for the bias beta1
  221. df.pav %>% summarise(n.PAV = sum(outlier, na.rm=T),
  222. n.delta = sum(outlier.delta, na.rm=T),
  223. n.tot = sum(outlier.delta | outlier, na.rm=T)) # count the outliers
  224. df.pav = df.pav %>% filter(!outlier, !outlier.delta, !is.na(beta1), !is.na(delta_explicit_liking)) %>%
  225. dplyr::select(sbj, pre, beta1, delta_explicit_liking) %>% # remove outlier and clean the dataset
  226. mutate(sbj = droplevels(sbj)) # drop unused levels to avoid bugs during model fitting
  227. ### --- Inferential statistics ---
  228. ### Correlation matrix
  229. cor(df.pav[,-1], use = "pairwise.complete.obs")
  230. ### Model
  231. summary(fit <- lm(delta_explicit_liking ~ beta1 + pre, data = df.pav))
  232. ### Bayes factors
  233. df.bf = as.data.frame(df.pav)
  234. BF.full = lmBF(delta_explicit_liking ~ beta1 + pre, data = df.bf) #6.289147 ±0%
  235. BF.pre = lmBF(delta_explicit_liking ~ pre, data = df.bf) # 0.8898105 ±0%
  236. # BF01 = BF.pre/BF.full = 0.1414835
  237. ### --- Plot ---
  238. ggplot(data = df.pav, aes(x = delta_explicit_liking, y = beta1)) +
  239. geom_smooth(method = "lm", color = "lightblue", linewidth = 2) + # Regression line
  240. labs(x = "∆ explicit liking (% pre - % post)",
  241. y = "regression coefficient (high coefficient = ST)") +
  242. geom_point(color = "darkcyan", alpha = 0.6, size = 3) + # Scatter points with custom color and size
  243. theme_minimal() + theme(text = element_text(size = 14),
  244. axis.ticks.x = element_blank())
  245. ggsave(paste0(figure_path, 'H3a_pav_deval.tiff'), width = 5.47, height = 6.03, dpi = 350) # 5.47 x 6.03
  246. ## ---- H3b) Learning bias as reinforcement learning bias ----
  247. ### Tagged outliers removal
  248. df.rl = tag_outliers(df.H3,"condition", "w") # tag the outlier for the bias w
  249. df.rl %>% summarise(n.RL= sum(outlier, na.rm=T),
  250. n.delta = sum(outlier.delta, na.rm=T),
  251. n.tot = sum(outlier.delta | outlier, na.rm=T))
  252. df.rl = df.rl %>% filter(!outlier, !outlier.delta, !is.na(w), !is.na(delta_explicit_liking)) %>%
  253. dplyr::select(sbj, pre, w, delta_explicit_liking) %>%
  254. mutate(sbj = droplevels(sbj)) # drop unused levels to avoid bugs during model fitting
  255. ### ---- Inferential statistics ----
  256. ### Correlation matrix
  257. cor(df.rl[,-1], use = "pairwise.complete.obs")
  258. ### Model
  259. summary(fit <- lm(delta_explicit_liking ~ w + pre, data = df.rl))
  260. # Bayes factors
  261. df.bf = as.data.frame(df.rl)
  262. BF.full = lmBF(delta_explicit_liking ~ w + pre, data = df.bf) # 0.8886224 ±0%
  263. BF.pre = lmBF(delta_explicit_liking ~ pre, data = df.bf) # 1.624119 ±0%
  264. # BF01 = BF.pre/BF.full = 1.827682
  265. ### ---- Plot ----
  266. ggplot(data = df.rl, aes(x = delta_explicit_liking, y = w)) +
  267. geom_smooth(method = "lm", color = "lightblue", linewidth = 2) + # Regression line
  268. labs(x = "∆ explicit liking (% pre - % post)",
  269. y = "w (high coefficient = model-based bias)") +
  270. geom_point(color = "darkcyan", alpha = 0.6, size = 3) + # Scatter points with custom color and size
  271. theme_minimal() + theme(text = element_text(size = 14),
  272. axis.ticks.x = element_blank())
  273. ggsave(paste0(figure_path, 'H3b_w_deval.tiff'), dpi = 350, width = 5.47,height = 6.03)
  274. # ----- Supplementary analysis -------------------------------------------------
  275. ####################################################################
  276. # H2) Supplementary: There is an effect of session in the SRC task
  277. ####################################################################
  278. ## ---- Pre-processing ----
  279. df.src = read.csv2('DATA/supp_iw.csv', sep=',', dec = ".")
  280. # Merged original data frame with details from iw task
  281. df.merged = df.iw %>%
  282. dplyr::select(sbj, session, condition, RT_Hit) %>%
  283. inner_join(
  284. df.src %>% dplyr::select(sbj, session, condition, RT_towards, RT_away),
  285. by = c("sbj", "session", "condition")
  286. )
  287. ## --- H2 Supplementary a: RT towards ---
  288. ### -- Pre-processing --
  289. #### Outlier removal
  290. df.RT_towards = tag_outliers(df.merged,c("condition","session"), "RT_towards") # tag the outlier for RT at pre-post and Go-NoGo
  291. df.RT_towards %>% group_by(condition, session) %>% summarise(n = length(sbj),
  292. n.na = sum(is.na(RT_towards)),
  293. n.outlier = sum(outlier, na.rm=T)) # count the outliers for each condition
  294. outlier_subjects <- df.RT_towards %>%
  295. filter(outlier == TRUE) %>% # Find all rows marked as outlier
  296. distinct(sbj) %>% # Get distinct subjects with outliers
  297. mutate(to_exclude = TRUE) # Add a column to mark them for exclusion
  298. df.RT_towards <- df.RT_towards %>%
  299. anti_join(outlier_subjects, by = "sbj")
  300. df.RT_towards %>% group_by(session, condition) %>% summarise(mu = mean(RT_towards, na.rm = T),
  301. sd = sd(RT_towards, na.rm = T),
  302. n = sum(!is.na(RT_towards)))
  303. ### -- Inferential statistics --
  304. #### Homoscedasticity assumption
  305. leveneTest(RT_towards ~ session*condition, data=df.RT_towards) # F(3, 184) = 0.20, p = .895.
  306. #### Repeated measures ANOVA
  307. aov.RT.towards = anova_test(data = df.RT_towards, dv = RT_towards, wid = sbj,
  308. within = c(session, condition), effect.size = "pes") # F(1,46) = 63.68, p < .005
  309. ### -- Plot --
  310. df.RT_towards$session <- factor(df.RT_towards$session, levels = c("pre", "post"))
  311. ggplot(df.RT_towards, aes(x=session, y=RT_towards, fill=session)) +
  312. facet_wrap(~ condition, labeller = as_labeller(c("go" = "Go", "nogo" = "NoGo"))) + # splitting by condition
  313. geom_violin() + geom_boxplot(width = 0.2) +
  314. geom_line(aes(group = sbj), size = 0.6, alpha = 0.6, color = "grey20") +
  315. geom_point(aes(color = session), size = 1.5, alpha = 0.4, color = 'grey20') +
  316. scale_fill_manual(values = c("lightblue", "darkcyan")) +
  317. labs(y = "RT.Towards (s)", x = "") +
  318. theme_minimal() + theme(text = element_text(size = 14),
  319. strip.text.x = element_text(face="bold"),
  320. legend.text = element_text(face="bold"),
  321. axis.text.x = element_blank(),
  322. axis.ticks.x = element_blank(),
  323. plot.title = element_text(face = "bold"))
  324. ggsave(paste0(figure_path, 'H2Supa_RTtowards.tiff'), dpi = 350, width = 4.63,height = 4.58)
  325. ### --- H2 Supplementary b: RT away ---
  326. ### -- Pre-processing --
  327. #### Outlier removal
  328. df.RT_away = tag_outliers(df.merged,c("condition","session"), "RT_away") # tag the outlier for RT at pre-post and Go-NoGo
  329. df.RT_away %>% group_by(condition, session) %>% summarise(n = length(sbj),
  330. n.na = sum(is.na(RT_away)),
  331. n.outlier = sum(outlier, na.rm=T)) # count the outliers for each condition
  332. outlier_subjects <- df.RT_away %>%
  333. filter(outlier == TRUE) %>% # Find all rows marked as outlier
  334. distinct(sbj) %>% # Get distinct subjects with outliers
  335. mutate(to_exclude = TRUE) # Add a column to mark them for exclusion
  336. df.RT_away <- df.RT_away %>%
  337. anti_join(outlier_subjects, by = "sbj")
  338. df.RT_away %>% group_by(session, condition) %>% summarise(mu = mean(RT_away, na.rm = T),
  339. sd = sd(RT_away, na.rm = T),
  340. n = sum(!is.na(RT_away)))
  341. ### -- Inferential statistics --
  342. #### Homoscedasticity assumption
  343. leveneTest(RT_away ~ session*condition, data=df.RT_away) # F(180, 3) = 0.39, p = .760
  344. #### Repeated measures ANOVA
  345. aov.RT.away = anova_test(data = df.RT_away, dv = RT_away, wid = sbj,
  346. within = c(session, condition), effect.size = "pes") # F(45, 1) = 60.29, p < .005
  347. #### -- Plot --
  348. df.RT_away$session <- factor(df.RT_away$session, levels = c("pre", "post"))
  349. ggplot(df.RT_away, aes(x=session, y=RT_away, fill=session)) +
  350. facet_wrap(~ condition, labeller = as_labeller(c("go" = "Go", "nogo" = "NoGo"))) + # splitting by condition
  351. geom_violin() + geom_boxplot(width = 0.2) +
  352. geom_line(aes(group = sbj), size = 0.6, alpha = 0.6, color = "grey20") +
  353. geom_point(aes(color = session), size = 1.5, alpha = 0.4, color = 'grey20') +
  354. scale_fill_manual(values = c("lightblue", "darkcyan")) +
  355. labs(y = "RT.Away (s)", x = "") +
  356. theme_minimal() + theme(text = element_text(size = 14),
  357. strip.text.x = element_text(face="bold"),
  358. legend.text = element_text(face="bold"),
  359. axis.text.x = element_blank(),
  360. axis.ticks.x = element_blank(),
  361. plot.title = element_text(face = "bold"))
  362. ggsave(paste0(figure_path, 'H2Supb_RTaway.tiff'), dpi = 350, width = 4.63,height = 4.58)
  363. ######################################################
  364. # H2) Supplementary: SRC task half-split reliability
  365. ######################################################
  366. df.halfsplit = read.csv('DATA/supp_src_long.csv',sep=',', dec = ".")
  367. ## Keep only participants from the main analysis (without outliers)
  368. df.halfsplit <- df.halfsplit %>%
  369. filter(sbj %in% df.iw$sbj)
  370. ## Compute half-split reliability
  371. rel <- rapidsplit(
  372. data = df.halfsplit,
  373. subjvar = "sbj",
  374. diffvars = "Instruction", # Away vs Toward
  375. stratvar = "imageUID", # Stimulus ID
  376. aggvar = "RT",
  377. aggfunc = "medians", # or "means"
  378. splits = 6000
  379. )
  380. print(rel)
  381. ## Plot
  382. ggplot(data.frame(corrs = rel$allcors), aes(x = corrs)) +
  383. geom_histogram(bins = 40, fill = 'darkcyan') +
  384. geom_vline(xintercept = mean(rel$r), linewidth = 1, color = 'grey20') +
  385. labs(
  386. x = "Permutation-based split-half correlations",
  387. y = "Count"
  388. ) +
  389. theme_classic()
  390. ggsave(paste0(figure_path, 'H2SupReliability.tiff'), dpi = 350, width = 4.63,height = 4.58)
  391. ######################################################
  392. # H3) Supplementary: Visit order influence on bias
  393. ######################################################
  394. df.visit_order = read_csv('DATA/supp_visit_order.csv')
  395. ### -- Pavlovian conditioning --
  396. df.pav_with_visit <- df.pav %>%
  397. left_join(
  398. df.visit_order %>%
  399. filter(task == "PAV"),
  400. by = "sbj"
  401. )
  402. ## Model
  403. summary(fit <- lm(beta1 ~ visit, data = df.pav_with_visit))
  404. ### -- Sequential learning --
  405. df.rl_with_visit <- df.rl %>%
  406. left_join(
  407. df.visit_order %>%
  408. filter(task == 'SL'),
  409. by = "sbj"
  410. )
  411. ## Model
  412. summary(fit <- lm(w ~ visit, data = df.rl_with_visit))

main.R, no license · at the source

Overview

  1. Laboratory for Neurorehabilitation Science, Medicine Section, Faculty of Science and Medicine, University of Fribourg, Fribourg, Switzerland
  2. Department of Psychology, Faculty of Psychology and Educational Sciences, University of Geneva, Geneva, Switzerland
  3. Swiss Center for Affective Sciences, University of Geneva, Geneva, Switzerland
Institutions: University of Fribourg (Switzerland); University of Geneva (Switzerland)
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1180
Dates: received 18 February 2026; accepted 20 February 2026; published online 30 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1180 · PMID 41924031 · PMCID PMC13037660 · OpenAlex W7133841616
Open access: diamond, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), cognitive (subfield)
Methods: Spectral & time-frequency, Statistics, Machine learning, Preprocessing, Evoked potentials, Physiology & signal measures
Keywords: executive training, reward system, ERP, electrical neuroimaging, incentive saliency, Pavlovian learning
Topic: Eating Disorders and Behaviors (Clinical Psychology, Psychology), according to OpenAlex
Funding: Swiss National Science Foundation (212616)
Citations: not cited yet (Europe PMC); 93 references in the paper

Abstract

Recent evidence indicates that interventions involving the repeated inhibition of motor responses to environmental cues reduce brain reward responses and craving for these cues, and in turn their consumption. Such approaches have been put forward as a promising solution to unhealthy food overconsumption. Yet, the neurocognitive mechanisms underlying inhibition training to reduce reward responses remain largely unknown. We addressed those questions in a within-participant pre–post intervention study examining how target stimuli (Go)/non-target stimuli (NoGo) training reduces implicit motivational and electrophysiological activity to trained sugary drink cues. We then examined whether computational indices of Pavlovian and other reinforcement learning biases moderate the efficacy of the training, to test how inhibition training involves learning mechanisms. In addition to replicating evidence for a reduction in explicit cue valuation with Go/NoGo training, our results identified the N2 event-related potentials (ERP) component as modulated by the training, and individual Pavlovian biases as moderators of training efficacy. These findings point to inhibitory control and associative devaluation as the neurophysiological mechanisms supporting the effect of Go/NoGo training on cue valuation, and a contribution of Pavlovian learning in these processes.

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 10 matches between paragraphs and lines of code.

OSF y49gv

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Languages: R (2)
Size: 86 files, 2 scripts
Software Heritage: not checked
Found in: “Data and Code Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (2 files), BayesFactor (1 file), car (1 file), lme4 (1 file), rstatix (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
2 files
At the source: osf.io/y49gv

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;
  • 2 scripts, each with its path and the digest of its content;
  • 10 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

Datasets cited

Data and Code Availability

The data and analyses scripts are available on our OSF page: https://osf.io/y49gv.

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

Recorded: type, language, journal, volume, pages, dates, 4 authors, 6 keywords, 1 funder, 86 references.

Cite

This paper

Tapparel, M., Pool, E. R., Najberg, H., & Spierer, L. (2026). Plastic brain mechanisms supporting reduction in cravings induced by response training. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1180. https://doi.org/10.1162/imag.a.1180

BibTeX

@article{tapparel2026plastic,
author = {Tapparel, Malika and Pool, Eva R and Najberg, Hugo and Spierer, Lucas},
title = {{Plastic brain mechanisms supporting reduction in cravings induced by response training}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = mar,
volume = {4},
pages = {IMAG.a.1180},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1180},
url = {https://doi.org/10.1162/imag.a.1180},
pmid = {41924031},
pmcid = {PMC13037660}
}

RIS

TY - JOUR
AU - Tapparel, Malika
AU - Pool, Eva R
AU - Najberg, Hugo
AU - Spierer, Lucas
TI - Plastic brain mechanisms supporting reduction in cravings induced by response training
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/03/30
VL - 4
SP - IMAG.a.1180
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1180
UR - https://doi.org/10.1162/imag.a.1180
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1180",
"type": "article-journal",
"title": "Plastic brain mechanisms supporting reduction in cravings induced by response training",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Tapparel",
"given": "Malika"
},
{
"family": "Pool",
"given": "Eva R"
},
{
"family": "Najberg",
"given": "Hugo"
},
{
"family": "Spierer",
"given": "Lucas"
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1180",
"DOI": "10.1162/imag.a.1180",
"PMID": "41924031",
"PMCID": "PMC13037660",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1180",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
30
]
]
}
}

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.1118 [code]
Sign-tracking bias is associated with the inhibition of motor response to appetitive food cues.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: BayesFactor, tidyverse, EEG, cognitive, 28 references, 3 authors
[2] doi:10.1038/s41467-023-43747-5 [code]
Neural substrates of parallel devaluation-sensitive and devaluation-insensitive Pavlovian learning in humans.
Journal: Nature communications
In common: BayesFactor, car, lme4, 1 other tool, cognitive, 5 references, author Eva R Pool
[3] doi:10.1371/journal.pbio.3003979 [code]
Impaired midfrontal‑motor theta phase synchronization characterizes maladaptive motivational behavior in people with obsessive‑compulsive disorder.
Journal: PLoS biology
In common: BayesFactor, car, lme4, 1 other tool, EEG, 4 references
[4] doi:10.1007/s10548-025-01131-0 [code]
ERP Signals During Speech Articulation: Does Auditory Feedback Mask Other Ongoing Cognitive-motor Processes?
Journal: Brain topography
In common: EEG, cognitive, 8 references
[5] doi:10.1038/s41598-026-58046-4 [code]
Dissecting the interplay of model-based control, impulsivity and compulsivity on self-control in daily life.
Journal: Scientific reports
In common: car, lme4, tidyverse, EEG, cognitive, 5 references
[6] doi:10.1093/cercor/bhae187 [code]
Asynchronous behavioral and neurophysiological changes in word production in the adult lifespan.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: car, lme4, tidyverse, EEG, cognitive, 4 references
[7] doi:10.1007/s10548-024-01057-z [code]
The Role of Anatomic Connectivity in Inhibitory Control Revealed by Combining Connectome-based Lesion-symptom Mapping with Event-related Potentials.
Journal: Brain topography
In common: EEG, cognitive, 6 references
[8] doi:10.1038/s41598-024-71692-w [code]
On the effects of impulsivity and compulsivity on neural correlates of model-based performance.
Journal: Scientific reports
In common: lme4, tidyverse, EEG, cognitive, 5 references
[9] doi:10.3390/nu15010244 [code]
Differential Orbitofrontal Cortex Responses to Chocolate Images While Performing an Approach-Avoidance Task in the MRI Environment.
Journal: Nutrients
In common: 5 references
[10] doi:10.1111/add.70283 [code]
Appetitive responses toward smoking-related stimuli in abstinence-motivated, non-deprived individuals with chronic tobacco dependence: A multi-methodological investigation.
Journal: Addiction (Abingdon, England)
In common: rstatix, car, tidyverse, 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1162/imag.a.1180.svg)](https://openscicode.org/badge/doi/10.1162/imag.a.1180)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1162/imag.a.1180.svg
   :target: https://openscicode.org/badge/doi/10.1162/imag.a.1180
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1162/imag.a.1180"><img src="https://openscicode.org/badge/doi/10.1162/imag.a.1180.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.