This folder contains the analysis scripts and the results of the study "Is executive control related to working memory capacity and fluid intelligence?" from Rey-Mermet, Gade, Souza, von Bastian and Oberauer.
<br>The analysis scripts were programmed with R within RStudio. These files are given in the folder "R scripts".
<br>First, the data were merged, trimmed and aggregated. This was done with the R script called `1. aggregate`. The result of these procedures are presented in the folder `datasets`.
<br>Then, the analyses (i.e., computation of the descriptives results, the reliability estimates, the correlations and the structural equation modeling - SEM - analyses) were performed with the R script `2. reliability_correlation_SEM`.
<br>These analyses were performed for 3 different dependent measures:
- `diff`: the difference in error rates between incongruent and congruent trials for the color Stroop, number Stroop, arrow flanker, letter flanker, and Simon tasks, the difference in error rates between antisaccade and prosaccade trials for the antisaccade task, error rates on stop trials for the stop-signal task, and error rates for all tasks assumed to measure fluid intelligence (gF) and working memory capacity (WMC).
- `resdiff`: error rates on incongruent trials were regressed on error rates on congruent trials, and residual scores were used as dependent measures for the color Stroop, number Stroop, arrow flanker, letter flanker, and Simon tasks; error rates on antisaccade trials were regressed on prosaccade trials, and residual scores were used as dependent measure for the antisaccade task; the dependent measures were the error rates on stop trials for the stop-signal task, and for all tasks assumed to measure gF and WMC
- `icc`: accuracy rates on incongruent and congruent trials for the color Stroop, number Stroop, arrow flanker, letter flanker, and Simon tasks, on antisaccade trials for the antisaccade task, on stop trials for the stop-signal task, and for all tasks assumed to measure gF and WMC -> These dependent measures were used to compute bi-factor models.
The following additional dependent measures were used:
- For the antisaccade task, in addition to the difference score between prosaccade and antisaccade trials (`antisaccade`), we also used performance on antisaccade trials (`antisaccade_ic`).
- For the stop-signal task, in addition to the performance (error / accuracy) score (`stopsignal`), we also a special stop-signal reaction time (`specssrt`, that is, go reaction times were rank ordered and the stop-signal reaction time was computed by subtracting the mean stop-signal delay from the go RT that corresponded to the probability of inhibiting the response; see Schachar et al., 2007).
<br>There were 2 transformations of dependent measures:
1. `raw`: Performance (error/accuracy) were averaged for each task and participant.
2. `res`: To remove the impact of practice and/or fatigue effects, we computed a linear regression analysis with participant’s mean error rates as outcome variable and task-order (forward, backward) as a dichotomous predictor (coded as -0.5 and 0.5, respectively), and we used the residuals as dependent measures
<br>Seven filters were applied :
- `acc_all`: all data (including missing data) were analyzed and structural equation modeling was run with case-wise maximum likelihood
- `acc_without251`: all data excluding participants with missing data and one participant who had error rates close to the chance level across several tasks and who postponed her/his reactions in several calibration blocks
- `acc_withoutMD`: all data excluding participants with missing data
- `acc_withoutMDBDI`: all data excluding participants with missing data and participants with a score above 13 in the BDI-II
- `acc_withoutMultiOut`: all data excluding participants with missing data and multivariate outliers from experimental blocks (i.e., cases with significant Mahalanobis’s d2 values)
- `acc_withoutMultiOutCalib`: all data excluding participants with missing data and multivariate outliers from accuracy rates in calibration blocks (i.e., cases with significant Mahalanobis’s d2 values)
- `acc_withoutMultiOutCalibDeadline`: all data excluding participants with missing data and multivariate outliers from response deadlines in calibration blocks (i.e., cases with significant Mahalanobis’s d2 values)
- `acc_withoutMultiOutDiff`: all data excluding participants with missing data and multivariate outliers from experimental blocks (i.e., cases with significant Mahalanobis’s d2 values) in case the dependent measure is the difference score
<br>The results are presented in the folder `results` for each dependent measure. Names of subfolders and files were created by combining the abbreviations of the type of dependent measures, filters and data transformations.
<br> Each of the folders contains:
- a txt file named `participantlist`: list of participant`s ID used for the analyses in the folder
- a txt file named `descriptives`: descriptive statistics
- a subfolder `with_yeo-johnson`: analyses when a Yeo-Johnson transformation (Yeo & Johnson, 2000) was applied on at least one dependent measure because skew and kurtosis were smaller than -2 or larger than 2
- a subfolder `without_yeo-johnson`: analyses in case no Yeo-Johnson transformation (Yeo & Johnson, 2000) was applied
<br> The folders `with_yeo-johnson` and `without_yeo-johnson` contain:
- a txt file named `reliability`: reliability estimates
- a txt file named `corrmatrix`: correlations with t- and p-values
- a subfolder `SEM`, which, in turn, contains the model assessmsents, separately for each type of dependent measures used for the stop-signal task (i.e., `stopsignal` when accuracy/error rates on stop trials was used as dependent measure, and `specSSRT` when the special stop-signal reaction time was used as dependent measure) and for the antisaccade task (i.e., `antisaccade_ic` when performance on antisaccade trials was used as dependent measure; otherwise the performance difference between antisaccade and prosaccade trials was used as dependent measure):
- `inhibition`: SEM results with executive control as a latent variable
- `wmcr_inhibitiontask`: SEM results in which each individual measure of executive control was a predictor for the latent variables of gF and WMC.
- `wmcr`: SEM results with gF and WMC as latent variables
<br>The models used in SEM are presented in the folder `models`. This folder contains a subfolder `diff` for the dependent measures `diff` and `diffres`, and `icc` for the dependent measure `icc`. Each of these subfolders contains the different models.
<br>Overview of the results is presented in a txt file (outside of the zip file) called `frequencies_SEMresults.txt`. This overview was computed with the R script `3. overview results`.
<br>The results reported in the results section of the article are presented in `results/diff/acc_withoutMD_raw`.
For this data filter (i.e., the dependent measures were difference scores computed on raw data, and participants with missing data were removed), two additional analyses were performed:
- on the calibration block (see Appendix in the article). This analysis was computed with the R script `4. calibration`.
- when errors of omission and of commission were differentiated. This analysis was computed with the R script `5. executive_error types`.