The Competition Dynamics of Approach and Avoidance Motivations Following Interpersonal Transgression

Published: 22 May 2024| Version 4 | DOI: 10.17632/jcng3638wx.4
Bo Shen


This repository contains the data and code reported in the paper authored by Bo Shen, Yang Chen, Zhewen He, Weijian Li, Hongbo Yu, and Xiaolin Zhou "The Competition Dynamics of Approach and Avoidance Motivations Following Interpersonal Transgression". In this study, we are interested in testing the approach-avoidance behavioral conflict in a transgressor after interpersonal harm. The analyses were conducted using R and Matlab. Data files: There are two data files, the binary choice dataset named "allsubjdat.RData" and the dataset combined with mouse trajectories named "allsubjmstrckdat.RData". Codes:


Steps to reproduce

In order to reproduce the figures, you have to: Step 1. Install R on your computer, please follow this link to install the updated version of R on your device Step 2. Install R-Studio on your device, please follow the suggestion of this link to pick an updated version for your device Step 3. If you are interested in replicating the model fitting with RStan that we used for estimating decision weights for binary choice, and the dynamics of decision weights for mouse trajectories, you need to install a compatible RStan version with R and RStudio. Please follow the suggestions in the following link Step 4. Download the two data files, and update the directories into the code to match the directories on your device. Step 5. We listed the code that corresponded to the panels of figures in the paper. - Figures 2a and b: Self-reported emotions.Rmd/html - Figures 2c and d: FinalDecisions.Rmd/html - Figures 3a-c: MstrckAnalysis.Rmg/html - Figures 3d and e: Code under the folder "Bootstrapping on mouse tracking ESTPs," which contains Rmd scripts and a Matlab function - Figure 4: Circuit-Model.Rmd/html - Figure 5: Code under the folder 'tDDM'. We fitted tDDM and a standard DDM models using R scripts. Parallel computation packages reported in Maier et al., 2020 were used to facilitate the data fitting (having problem on MacOS, recommend to use Windows).


New York University, Zhejiang Normal University, Peking University


Human Behavior, Behavioral Experiment