analysis#
The analysis package for the Litman stability workstream: reproducing the data-driven autism classes of Litman et al. (2025) and testing whether they hold within strata of age at diagnosis and diagnostic era.
Each stage is a CLI subcommand that reads named inputs and writes its outputs plus a manifest
under a content-addressed artefacts/ directory, so a later run recomputes only what changed.
The pipeline#
Three stages build the named reference, and four more stress-test it. The cohort stage builds
the harmonised proband-by-feature matrix, fit fits the reference four-class mixture model, and
align names the classes; the four checks branch from there.
flowchart LR
subgraph reference [Build the reference]
direction LR
cohort[cohort] --> fit[fit] --> align[align]
end
align --> stability[stability]
align --> nmin[nmin]
cohort --> select[select]
cohort --> replicate[replicate]
cohort --> strata[strata-describe]
The cohort layer sits behind one interface with a SPARK and an SSC backend, so a stage runs on either cohort. Each stage and where its result is reported:
Stage |
What it does |
Reported in |
|---|---|---|
|
Builds the harmonised proband-by-feature matrix from a SPARK release and the authors’ final feature list, with the reconciled feature typing. |
|
|
Fits the reference four-class general finite mixture model and predicts a class label per proband. |
|
|
Summarises each class into the seven literature-defined categories and aligns the recovered classes to Litman’s four named classes. |
|
|
Grids over the number of components and reports the information criteria. |
|
|
Ranks many single-init fits by log-likelihood, and refits on random halves, comparing each fit to the reference. |
|
|
Refits at descending sample sizes to fix the minimum viable stratum size. |
|
|
Fits on the SPARK features shared with the SSC, projects onto the SSC, and correlates the profiles against a permutation null. |
|
|
Builds the age-at-diagnosis and diagnostic-era axes, the lag, and the demographics, and tests each binning policy against the acceptance requirements. |
Technical guides#
How the machinery works: the staged pipeline and its cache, the runbook, the cohort interface, the SSC milestone parsing, and choosing the stratification bins.
The staged commands, the content-addressed artefact cache, the run manifests, and the reproducibility choices behind them.
The runbook: the commands to run everything implemented so far, in order, and what each stage depends on.
One interface over SPARK and the SSC, the pinned feature set, and the deliberate departures from the released preprocessing.
Turning the SSC’s free-text developmental-milestone ages into months: the forms recognised, and the entries left missing.
Cutting a later SPARK release back in time to the probands present at Litman’s V9 freeze: the roster and completion gates, and what the cut recovers.
The binning policies, the acceptance requirements a partition must meet, and the
strata-describe check that fixes the bins the stratified analysis runs on.
Investigations#
Each investigation answers one question, with its own figure and headline result. Read in order for the arc, or jump to one.
Do the four classes reproduce? They do: proportions 39/29/18/15 against the published 37/34/19/10, every named-class anchor holds, and the overall profile correlates with the published figure at \(r = 0.90\).
How many classes do the data support? The selection criteria over-extract at this sample size (their minimum is at nine classes); four is retained by reading them, as the authors did.
Do the classes survive re-initialisation and resampling? The profiles reproduce at 0.91 to 0.92 and no class ever collapses; proband-level membership is softer (adjusted Rand 0.63 to 0.65).
How small a stratum stays viable? Recovery is reliable from about 1,000 probands (isotonic floor about 840), so the stratification bins are best kept nearer 2,000.
Do the classes replicate in a second cohort? They do in the SSC, at \(r = 0.89\) (\(p = 0.006\)), with a bootstrap interval \([0.79, 0.93]\) that includes the authors’ published \(0.927\); six of the seven categories correlate at \(0.85\) or above, the developmental category lower at \(0.79\).
Several of these investigations carry a third condition alongside the full 2026-03-23 release
and the published values: the cohort cut back to the records present at the authors’ V9 freeze
(see subsetting the cohort to the V9 freeze), which
isolates the differences that trace to the records added since.
Reference#
The command-line interface, the run and caching infrastructure, the cohort abstraction, feature typing, the model wrapper, and the enrichment and alignment.