Skip to content

Latest commit

 

History

History
152 lines (120 loc) · 6.31 KB

data_dictionary.md

File metadata and controls

152 lines (120 loc) · 6.31 KB

Data dictionary

The statistical pipeline (code/statistical_tests.R) consumes eight semicolon-delimited CSV files. These files contain individual-level and clinical data and are not redistributed in this repository.

To run the analysis, place the files in a folder and point the script at it:

TOMASD_DATA_DIR=/path/to/data Rscript code/statistical_tests.R

Cohort: N = 126 children (one row per subject). Group label values across files: asd, adhd, ad, NT (sometimes also coded as clin vs ctrl, or as the original French abbreviations TSA/TDA/TA in data_QD.csv). All wide-format files share row order so they can be joined on row index.

Opponent indexing convention

The five opponents reported in the manuscript map to the CSV columns as follows:

Manuscript label Wide CSV column Long CSV factor level Description
Random-biased (RB) hs_0 / pc_0 RB Stochastic opponent biased to one side
0-ToM hs_1 / pc_1 X0tom / X0ToM Reinforcement-learning-style opponent
1-ToM hs_2 / pc_2 X1tom / X1ToM Models depth-0 opponent
2-ToM hs_3 / pc_3 X2tom / X2ToM Models depth-1 opponent
Sequential (mean) hs_seqMoy / pc_seqMoy moyseq / seqMoy Mean across deterministic sub-sequences A/B/C

Prefixes: hs_ = Hide-Seek (social framing); pc_ = A Picky Chick (non-social framing).


Files (wide format, one row per subject)

perf_nomissing_wgroup.csv

Per-subject win rate against each opponent in each framing.

column type description
(rowname) int subject row index (1..N)
hs_0–hs_3, hs_seqMoy float Win rate, social, per opponent (see mapping above)
pc_0–pc_3, pc_seqMoy float Win rate, non-social, per opponent
BrainUs_ID string Pseudonymous platform UUID
group string asd / adhd / ad / NT
group_bin string clin / ctrl
group_asdbin string ASD / nonASD

ktom.csv

Per-subject sophistication phenotype: posterior expected ToM depth k, computed from the softmax over k-ToM model evidences.

column type description
Social float Sophistication, social framing
Non-social float Sophistication, non-social framing
Groupe string Diagnostic group
Groupe_bin string clin / ctrl
Gr_asdbin string ASD / nonASD

ftom.csv

Per-subject flexibility phenotype: 1 minus the dot product of softmaxed model evidences across framings (high = different model best supports behavior in social vs non-social).

column type description
Flexi float Flexibility index (0–1)
Groupe string Diagnostic group
Gr_asdbin string ASD / nonASD

alternance_nomissing.csv

Per-subject alternance scores per opponent and framing, z-scored within the cohort.

⚠️ Naming caveat. The CSV column is labeled alternance, but the aggregated group means in aggregated/phenotypes.csv show ASD higher than NT — consistent with the manuscript's perseveration finding, not its inverse. The values appear to follow the manuscript convention (positive = perseveration). The R script preserves this and labels its y-axis "Perseveration/alternance Score". Confirm with the analysis authors before relying on the sign for new analyses.

column type description
ID int Subject index
hs_0–hs_3, hs_moyseq float Alternance z-score, social, per opponent
pc_0–pc_3, pc_moyseq float Alternance z-score, non-social, per opponent
framing...7, framing...14 string "social" / "non social" sanity columns
group, group_bin, group_asdbin string as above

clinicalscales_nomissing.csv

Per-subject parent-reported clinical scales (de-identified, sequential ID).

column type description
X / (rowname) int Subject index
group_bin, Groupe string Group
cbcl_anxiousdistress, cbcl_socialproblems, cbcl_thoughtproblems, cbcl_totalproblems float CBCL subscale scores
BRIEF float BRIEF Global Executive composite
CONNERS float Conners-3 composite
SCARED float SCARED total
SCQ float SCQ Lifetime total
*_nona float Same scales after missing-data imputation

data_QD.csv

Master sheet combining demographics, clinical battery, raw performance, and derived phenotypes. Used by the R script for the clinic data frame and the final merge with phenotypes.

⚠️ Privacy. Contains potentially re-identifiable columns (ID BrainUs, decimal age, sex, ADOS dates) and is released only under the data-access agreement. Variable names mix English, French (e.g. FlexibilitÈ.brief), and unicode (𝑘 ̂_Social); see column headers for the authoritative list.


Files (long format, repeated-measures rows)

perf_nomissing_wgroup_long.csv

Performance reshaped for the 3-way mixed ANOVA (Group × Framing × Opponent). Two rows per subject (one per framing); opponent is a column.

column type description
ID / id int Subject index (repeated across framings)
framing string "social" / "non social"
group string Diagnostic group
RB, X0ToM, X1ToM, X2ToM, seqMoy float Win rate per opponent (see mapping)

alternance_nomissing_long.csv

Alternance reshaped likewise. Same row structure as the perf long format.

column type description
ID / id int Subject index
framing string "social" / "non social"
group string Diagnostic group
RB, X0tom, X1tom, X2tom, moyseq float Alternance z-score per opponent

Provenance

The CSVs are produced from the MATLAB fitting pipeline in code/ (k-ToM model inversion via the VBA toolbox), followed by per-subject extraction of the three phenotypes. The extraction scripts that bridge the MATLAB outputs to these CSVs (and the alternance/perseveration estimation in particular) are not in this repository.