Modelling Nonlinear Personality Change Surrounding Transitions

These pages demonstrate how to apply seven approaches to the statistical modelling of nonlinear change using R. They are intended to be used in conjunction with the explanations provided in the paper “Modelling Nonlinear Personality Change Surrounding Transitions: A Review of Statistical Approaches”.

To reproduce the results, it is necessary to prepare the data set, plot base, and training and test data sets, as outlined in the “Data Preparation” section.

R version and package versions used:

R version 4.4.2 (2024-10-31)
Platform: 

Matrix products: 


attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] mvtnorm_1.3-2       rstan_2.32.6        StanHeaders_2.32.10
 [4] lgpr_1.2.4          tidygam_0.2.0       gratia_0.9.2       
 [7] mgcv_1.9-1          segmented_2.1-3     MASS_7.3-61        
[10] boot_1.3-31         nlme_3.1-166        nls.multstart_1.3.0
[13] caret_6.0-94        lattice_0.22-6      lmerTest_3.1-3     
[16] lme4_1.1-35.5       Matrix_1.7-1        lubridate_1.9.3    
[19] forcats_1.0.0       stringr_1.5.1       dplyr_1.1.4        
[22] purrr_1.0.2         readr_2.1.5         tidyr_1.3.1        
[25] tibble_3.2.1        ggplot2_3.5.1       tidyverse_2.0.0    
[28] foreign_0.8-87