Analysis code - Italian RAADS-R validation
===========================================

R analysis scripts supporting "Validation and Likelihood-Ratio Calibration of the
Italian Ritvo Autism Asperger Diagnostic Scale-Revised (RAADS-R)".

All scripts read a single data source: the de-identified dataset shipped with this
release (../data/RAADS-R_Italian_validation_dataset.csv). 00_load_data.R rebuilds the
analytic object used across the pipeline from that file (Sample 1 = 752, Sample 2 = 708;
the AQ subset is the 646 Sample-2 participants who completed the AQ).

Only analytic scripts whose results appear in the paper and supplement are included:
reliability, CFA / bifactor / ESEM structure, measurement invariance, DIF, IRT,
dominance, ROC / cut-off, likelihood-ratio bands, post-test probabilities, MANCOVA,
combined cut-off, AQ convergence, and the RAADS-M sensitivity analyses (Appendix B).
Data-preparation, sample-construction, table/figure and dataset-build scripts are not
included; the sampling and age-within-gender matching procedure is described in the
manuscript Methods.

DATA
----
Raw questionnaire exports (.sav) are not shared: they carry participant-generated
linkage codes and cannot be released under the study's ethics protocol (data
minimization). The misclassification demographic profiling reported in the paper (false
positive / false negative education, parenting and psychiatric correlates) relied on
fields excluded from the public dataset and is therefore not part of this code release.
Age is provided in completed years.

SCRIPTS
-------
00_load_data               loads ../data/...dataset.csv and rebuilds the analytic object
00_packages                package loading
03_reliability             omega / alpha reliability
04_cfa                     confirmatory factor analysis (ordinal)
05_bifactor / 05b          bifactor model (omega_h, ECV); RAADS-M bifactor
10_esem / 10b              ESEM; ESEM measurement invariance across groups
06 / 06b / 06c / 07        measurement invariance (group, gender, parcel-level, cross-sample)
08 / 08b / 08c             DIF (group; gender + RAADS-M; group via ordinal logistic regression)
09_irt_grm                 IRT graded response model
11_dominance               dominance / relative importance
12_roc_cutoff              ROC analysis, Youden cut-off
13 / 13b / 13c             likelihood-ratio bands; bootstrap CIs; RAADS-M bands
14_post_test_curves        post-test probability curves
15_mancova                 Group x Gender MANCOVA
17_combined_cutoff         combined / cross-sample cut-off
18_aq_convergence          RAADS-R x AQ convergence and subscale cross-correlations (Sample 2)
19_scoring_alternatives    RAADS-M alternative scoring
27_raadsm_recompute        RAADS-M accuracy / reliability / categorical decomposition
20_extras_subscalecorr     RAADS-R DSM-5 subscale intercorrelations; response-pattern counts

REPRODUCIBILITY
---------------
R with renv. From the project root:
  renv::restore()                       # installs the package versions in renv.lock
  source("code/00_packages.R")
  # then run the numbered scripts; each calls load_raads() to read the dataset
Each script reads the dataset through load_raads(), computes its results, and writes them
to an output/ folder. The scripts run standalone: they need only the dataset and the R
packages recorded in renv.lock, with no other external inputs.

CITATION / CONTACT
------------------
Please cite the associated article (Tortora, Ronconi, Gasparini, Moscone, Panzeri, &
Vagni). Corresponding author: Marta Panzeri, University of Padova
(marta.panzeri@unipd.it).
