DOI: 10.5281/zenodo.10445889
title: Spontaneous Thought Dynamics as a Signature of Positive and Negative Affectivity

description: Data and scripts for Lux, Lee, Han, Lee, Gim, Choi, & Woo (2024)

Spontaneous Thought Dynamics as a Signature of Positive and Negative Affectivity

Byeol Kim Lux*, Eunjin Lee*, Jihoon Han, Sung-Ha Lee, Suhwan Gim, Incheol Choi, Choong-Wan Woo

*co-first authors. §corresponding author: Choong-Wan Woo (choongwan.woo@gmail.com)

 

The provided scripts are written in Matlab and have been tested on Matlab version 2020b. 


Dependencies



CanlabCore

CocoanCORE


Time



Expected install time is approximately 5 minutes.

Expected run time is around an hour in total.


 



Main scripts
The following are the major scripts that allow you to regenerate the results and figures of the manuscript. The order follows the results as they appeared in the manuscript. The data shared from previous works were cited in the manuscript.



`fastweb_fg2_DMPM_overview.mlx`

`fastweb_dmpm_1.m`

`fastweb_dmpm_2.m`

`fastweb_fg3_modelperformance_1.m`

`fastweb_fg3_modelperformance_2.m`

`fastweb_fg3_modelperformance_3.m`

`fastweb_fg4_DMPM_visualization.m`

`fastweb_fg5_inflammation.m`


To use these scripts, download and unzip the provided zipfile. Open the code in Matlab and set the current folder to the unzipped folder. Add the path to the current folder and its subfolders. The necessary data and functions to run the scripts has been saved in the folders. You can also find some interim results that are already included.

 

DMPM Modeling Workflow

The DMPM Modeling Workflow comprises a series of five scripts designed for constructing Density Map-based Predictive Models (DMPMs) to assess both positive affectivity (PA) and negative affectivity (NA). These scripts facilitate the evaluation of model performance across various test datasets. The DMPMs are initially trained using the Study 1 training dataset (N = 117) and subsequently fine-tuned, enabling their application to diverse datasets for predictive analysis.

Script Overview

Script 1: `fastweb_dmpm_1.m`

This script initiates the workflow, performing factor analysis to derive general positive and negative affectivity scores from self-report questionnaire responses. Additionally, it generates rating and vector density features across the valence-self-time axis using the Study 1 training dataset (N = 117). The script concludes with the selection of optimal model parameters, focusing on determining the appropriate number of principal components.

 

Script 2: `fastweb_dmpm_2.m`

The second script finalizes DMPM modeling parameters based on the results from the first script, `fastweb_dmpm_1.m`. It saves the final model and tests it on the Study 1 re-test dataset (Study 1 Session 2, N = 49).

 

Script 3: `fastweb_fg3_modelperformance_1.m`

This script evaluates the DMPMs' performance on both the training data (Study 1 training dataset) and re-test data (Session 2). It also generates relevant regression plots that contribute to Figure 3.

 

Script 4: `fastweb_fg3_modelperformance_2.m`

Building upon the foundation laid in the previous script, the fourth script continues the evaluation of DMPMs' performance, this time focusing on Study 2 data (N = 213) and creating corresponding plots (Figure 3).

 

Script 5: `fastweb_fg3_modelperformance_3.m`

The final script tests the DMPMs on Study 3 test data (N = 62) and generates the final set of plots for comprehensive model evaluation (Figure 3).

 

For additional details on each script's functionality, please refer to the respective script files. Collectively, these scripts present an extensive framework for the construction and assessment of Density Map-based Predictive Models.

 

Additional Scripts

`fastweb_fg2_DMPM_overview.mlx`:

This code generates the components required for Figure 2, providing an overview of the process for constructing input features for the DMPM.

`fastweb_fg4_DMPM_visualization.m`:

Focused on visualizing the DMPM model to interpret predictive weights. This script deals with creating bootstrap data for DMPM analysis, particularly for Figure 4. It involves data loading, bootstrapping, FDR correction, the creation of thresholded maps, unthresholded predictive weights, and the 3D cubic model visualization.

`fastweb_fg5_inflammation.m`:

This script explores results and figures pertaining to Inflammatory Marker Data (Figure 5 and Figure S8). It examines the Partial Correlation between Inflammatory Markers and General Affectivity scores from Dynamic Modeling Results.

 

Abstract

Spontaneous thought is a dynamic phenomenon that arises from continuous changes in an individual’s internal states. Their dynamic characteristics are likely to reflect individual differences and mental health variables, but few quantitative behavioral tasks and analysis methods are available to assess spontaneous thought dynamics. Here we conducted three studies (total n = 392) with a newly developed free association-based spontaneous thought sampling task. We derived predictive models of positive and negative affectivity based on the trial-by-trial response dynamics using a novel modeling approach named density map-based predictive modeling. Our models showed significant and robust prediction performances across multiple independent datasets. Furthermore, our model responses showed significant correlations with inflammatory marker response, suggesting that spontaneous thought dynamics have a meaningful impact on inflammatory physiology. Overall, this study suggests that spontaneous thought dynamics can serve as cognitive and affective signatures of individuals.