Skip to content

perakakis/AffectShifts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code and Data for the article "Bistability and Affect Shift Dynamics in the Prediction of Psychological Well-Being"

Citation

Goicoechea, C., Dakos, V., Sanabria, D., Heshmati, S., Westhoff, M., Banos, O., Pomares, H., Hofmann, S. G., & Perakakis, P. (2024). Bistability and affect shift dynamics in the prediction of psychological well-being. Emotion, 25(4), 982–996. https://dx.doi.org/10.1037/emo0001454

DOI

Repository Structure

Data/               # EMA and survey data for Spanish and German samples
Code/
  01_preprocess.R   # Data cleaning and preparation
  02_extract.R      # Bistability metrics extraction (basins, affect shifts, residence times)
  05_PCA.R          # Principal Component Analysis
  06_corrplot.R     # Correlation plots
  07_lasso.R        # LASSO regression
  08_stepwiseRegression.R
  09_relativeImportance.R
  auxFunctions.R    # Helper functions (LASSO, regression, nested models)
  predictor_colors.R

Reproducibility

This project uses renv to manage R package dependencies. To reproduce the analysis environment:

# install.packages("renv")  # if not already installed
renv::restore()

This will install all required packages at the exact versions recorded in renv.lock (R 4.5.2).

Scripts are intended to be run from the project root directory.

About

Code and data for our paper on Bistability and Affect Shifts in the Prediction of Psychological Well-being

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages