The influence of mental fatigue on decision inhibition and passing accuracy in soccer players under competitive pressure
收藏资源简介:
# Soccer Mental Fatigue, Decision Inhibition and Passing Accuracy Code and data archive for a within-subject experiment on how mental fatigue affects decision inhibition and passing accuracy in soccer players under competitive pressure. Thirty-six male soccer players completed six visits following a 6 x 6 balanced Latin square, pairing three mental-fatigue dose levels (Control, Moderate, High) with two competitive-pressure conditions (Low, High). Each visit comprised 132 formal trials (standard, change, ignore) across four blocks with high-pressure extras. ## Repository layout ``` . ├── README.md # this file ├── analysis-code.zip # full analysis pipeline (R + Python) ├── experimental-data.zip # trial-level, visit-level and QC records └── docs/ └── CHANGELOG.md # per-release notes (optional) ``` Both archives are self-contained. Download, unzip, and run; nothing is pulled from external repositories at execution time. ## Analysis pipeline The analysis implements the five modelling components reported in the manuscript. | Section | File | Description | |---------|------|-------------| | Equation (5) | `R/02_models_eq5.R` | Trial-level mixed-effects brms + CmdStan fits for radial error, pass latency, cue latency, pause latency, and change-trial accuracy. Fixed-effect kernel `1 + D + P + D:P + Q + Q:P` with correlated random slopes `(1 + D + P \| subj) + (1 \| visit_id)`. | | Equation (6) | `python/py_01_hddm_fit.py` | Hierarchical drift diffusion fit (HDDM 1.0.1 native). Threshold `a` varies across the six dose x pressure cells; drift `v` and non-decision `t` at the group level; starting point `z` fixed at 0.5; p_outlier 0.05; RT bounds [0.25, 1.5] s. | | Equation (7) | `R/03_mediation.R` | Two-stage mediation of dose on accuracy through first-fixation latency. Mediator is Gaussian; outcome is Bernoulli-logit; indirect = pi_XM * pi_MY. | | Equation (8) | `R/04_breakpoint.R` | Piecewise-linear breakpoint for leakage against time on task. Custom Stan hinge model with Uniform(10, 60) prior on the breakpoint. | | ROPE | `R/05_equivalence.R` | Equivalence test for pause latency per dose step with ROPE [-10, +10] ms. | | Supporting | `R/06_manipulation_checks.R`, `R/07_discounting.R`, `R/08_eye_tracking.R` | Manipulation checks, discounting coefficient k, first-fixation latency by dose. | | Assembly | `R/09_tables_figures.R` | Tables 4-7 and Figures 6 to 11, S1. | Full description of inputs, outputs, software stack, seeds and expected runtime is given in `analysis-code.zip` -> `README.md`. ## Data `experimental-data.zip` contains ten CSV files covering: | File | Rows | Content | |------|------|---------| | `01_participants.csv` | 36 | Athlete demographics and baseline measures | | `02_latin_square.csv` | 6 | 6 x 6 balanced Latin square | | `03_visit_schedule.csv` | 216 | One row per visit (36 athletes x 6 visits) | | `04_trial_level.csv` | 28,512 | Per-trial outcomes across standard / change / ignore trials | | `05_visit_level_manipulation_checks.csv` | 216 | VAS, STAI-SAI, HF-HRV, SCL, cost coefficient k | | `06_discounting_choices.csv` | 10,368 | Capacity-dependent discounting choices | | `07_ddm_input.csv` | 18,144 | HDDM input (subj_idx, stim, rt_s, response) | | `08_markerless_validation.csv` | 300 | Marker vs markerless pelvic yaw agreement | | `09_fatigue_induction_log.csv` | 5,760 | Per-minute induction task log | | `10_modality_qc.csv` | 28,512 | Per-trial validity flags per modality | The data dictionary bundled inside the archive gives per-column definitions. ## Quick start ### R stack ```r install.packages(c("brms", "data.table", "dplyr", "tidyr", "yaml", "ggplot2", "bayestestR", "loo", "posterior", "readr", "stringr", "jsonlite")) install.packages("cmdstanr", repos = c("https://stan-dev.r-universe.dev", "https://cloud.r-project.org")) cmdstanr::install_cmdstan(cores = 4) ``` ### Python (HDDM) ```bash micromamba env create -f environment.yml micromamba activate hddm38 ``` Then from the repository root: ```bash unzip experimental-data.zip unzip analysis-code.zip cp -r experimental-data/*.csv soccer-mental-fatigue-analysis/data/ cd soccer-mental-fatigue-analysis chmod +x run_all.sh ./run_all.sh ``` Each script in the pipeline is idempotent. Posterior draws cached under `outputs/posterior/` are reused across reruns; delete a given RDS to force a refit of that outcome. ## Expected runtime At the full sampling budget (4 chains x 4000 iterations x 2000 warmup): | Stage | Approximate wall-clock | |-------|------------------------| | 01 data prep | under 1 min | | 02 (five Eq (5) fits) | about 60 min | | 03 mediation | about 30 min | | 04 breakpoint | about 15 min | | py_01 HDDM | about 60 min | | 05 to 09 and figures | under 5 min | A low-fidelity QC budget (2 chains x 400 iterations x 200 warmup) completes in roughly 20 minutes. ## Reproducibility - All seeds are fixed in `R/00_env.R` (SEED_PRIMARY = 20240115, SEED_MEDIATION = 20240117, SEED_DDM = 20240119, SEED_BREAKPOINT = 20240121). - `sessionInfo.txt` records the R package versions used to produce the shipped outputs. - `environment.yml` pins the Python 3.8 dependency chain required by HDDM 1.0.1. ## Licence Data and code are provided for the sole purpose of enabling replication and extension of the published analysis. Please cite the manuscript when reusing either archive.



