CASSIE STATISTICAL ANALYSIS

ROUND 2 (revised manuscript, December 2026)

The results reported in the revised manuscript are in 08_round_2/ (see
08_round_2/README.md). They use the primary scores, in which all five
configurations were scored with the same citation verification procedure.
Run: Rscript run_analysis.R round2 ../../03_rubric_and_judge_scores/judge_item_scores_100_transcripts.csv
The folders described below reproduce the earlier, archived analyses.

26 November 2026

PUBLIC REPOSITORY VERSION (27 November 2026)

This is the version of the analysis collection shared in the CASSIE OSF
repository. It differs from the internal collection as follows:
- The two independent clinician raters are anonymized as Rater_A and
  Rater_B in all code, data, file names and outputs (RA_ / ra_ prefixes
  replace the earlier rater initials). R.J. is the specialist named in the
  manuscript.
- 08_earlier_analyses (superseded unweighted analyses), the internal findings
  document, rater notes, R.J.'s separate 16-item pilot responses and related
  audit files are not included. Rows for these remain in analysis_index.csv
  and source_index.csv for traceability only.
- After anonymization, "Rscript run_analysis.R all" was rerun (R 4.3.3, with
  the older package versions available in that environment). Every numerical
  output matched the run of the non-anonymized collection exactly, and
  checks/verify_reproduction.R matched 87 of 89 reference tables; the other
  two (mixed-model contrasts and diagnostics) differed only at about 1e-9
  relative difference, from the older lme4 version, and reproduce exactly
  under the versions in required_packages.csv. The check records in checks
  are from the original R 4.5.3 run.
- checks/file_checksums.csv and the packaged_sha256 column of
  source_index.csv were regenerated for the files in this version.

This collection contains all 44 distinct study R scripts located in the analysis
workspace. Sixty original copies were consolidated into one copy of each script.
Two additional support scripts run the analysis branches and verify numerical
reproduction against frozen reference tables.
Scripts have consistent formatting and portable input paths. Statistical rules,
model formulas, fixed seeds and comparison families have been retained.

FOLDER GUIDE

01_clinical
  Original R.J.-weighted clinical analysis, criterion-level analysis and the
  original score and weight workbooks. The original pipeline uses its outputs
  directory. Corrected composite contrast results are in 04_score_sensitivity.

02_language
  Readability, GPT-2 perplexity, integrated language metrics and exploratory
  correlations. The integrated script retains the original six-outcome family.
  The five retained outcomes and revised multiplicity families are also
  provided by 04_score_sensitivity. Clinical concept density is exploratory.

03_clinician_agreement
  Matched item agreement, criterion kappas, composite ICCs and score differences
  for Rater_A, Rater_B and the LLM. Includes common-weight and
  clinician-specific-weight analyses. Numerical outputs are in results.

04_score_sensitivity
  Earlier single-clinician assessment, score reconstruction, alternative
  weights, invariant-item sensitivity, paired bootstrap intervals, retained
  language outcomes and exact integer-unit correction of clinical contrasts.
  The numbered scripts run in order. Shared kappa and ICC functions are defined
  in 01_packet_agreement.R and imported without running that earlier analysis.

05_configuration_rankings
  Original rank-method excerpt and independent R checks of the clinician and
  LLM ranking tables. The excerpt is a reference fragment, not a standalone
  analysis. Included input tables retain the two-case and full-study rankings.

06_averaged_weights
  Post hoc sensitivity using three clinicians' importance weights. Each
  clinician is first normalized to sum to one, then the three vectors are
  averaged equally. A raw-weight-average alternative is reported separately.
  Data contain frozen score/rank preparation tables; results contain the
  inferential analyses. No LLM scores are regenerated.

07_figures
  Figures 2 and 3 with full configuration labels at 300 dpi, plus the earlier
  five-outcome linguistic figure script. Figure data are included.

08_earlier_analyses (not included in the public repository version)
  All earlier unweighted R analyses and their entry points, retained as
  historical versions. These are outside the default run and were syntax
  checked rather than rerun for this collection. They do not replace the
  weighted or corrected analyses.

support
  Python preparation and independent numerical-check scripts used alongside
  R for the ranking and averaged-weight analyses. Core R reruns use included
  prepared tables. Python is needed only to repeat preparation or the optional
  independent check; the latter requires NumPy.

reference_results
  Frozen numerical results used to check that reorganization and formatting
  preserve the previous analyses.

checks
  Execution records, R session information, numerical reproduction checks and
  compact logs. These document successful reruns and software versions.

RUNNING THE ANALYSES

Open a terminal in this folder and choose an analysis branch:

  Rscript run_analysis.R review
  Rscript run_analysis.R clinical
  Rscript run_analysis.R language
  Rscript run_analysis.R figures
  Rscript run_analysis.R all

The default branch is review. It repeats the clinician agreement, score
sensitivity, tie correction, ranking checks and averaged-weight inference.
The all branch runs all main branches above. Earlier unweighted versions are
retained separately and are not part of that run. Each branch records exit
statuses and R session information under checks. No packages are installed
automatically. R 4.5.3 was used for the checks accompanying this collection.
required_packages.csv records package names and the tested versions.
Generated plot exports and narrative drafts are omitted from this collection;
the corresponding scripts regenerate them. Numerical outputs are included.

Optional preparation from the package root:

  python3 support/averaged_weights/prepare_and_rank.py
  python3 support/configuration_rankings/calculate_rankings.py

Repeat the review branch after regenerating preparation tables. To repeat the
independent averaged-weight numerical checks after that R run:

  python3 support/averaged_weights/verify_independently.py

To compare the regenerated numerical outputs with frozen reference results:

  Rscript checks/verify_reproduction.R

ANALYSIS CONVENTIONS

The clinical dataset has 20 paired cases and five configurations, giving 100
transcripts. Original composite scores use R.J.'s weights. Each item score is
divided by its allowed maximum before weighted aggregation to 0-100. Within
each case, configurations receive 5 to 1 rank points, with average ranks and
fractional points for ties.

Use composite_contrasts_tie_corrected.csv for the corrected original-weight
clinical contrasts. Integer score units preserve genuine absolute ties in
Wilcoxon signed-rank tests. The original decimal contrast implementation is
retained for comparison. The corrected six-test Holm p-value for original
R.J.-weighted RAG versus No Scaffold is 0.035728455, displayed as 0.036.

Holm corrections are specific to their stated comparison family. The six
advanced-versus-control and all-ten-pair families are separate. Retained
language analyses use five omnibus tests, 30 advanced-versus-control contrasts
and a separate exploratory 50-pair family. Averaged-weight scheme comparisons
are post hoc; multiplicity is not adjusted across selection of weight schemes.

Matched clinician agreement comprises ten transcripts but only two case
clusters, V05 and V15. Criterion kappas and exact agreement concern item
judgments; importance weights affect composite scores. ICC(A,1) denotes
two-way absolute agreement for single ratings. Nominal ICC intervals assume
independent transcripts and do not account for the two case clusters.
R.J. contributes final 14-item importance weights, but his separate 16-item
response packet is not a third matched human rating set. No responses are
imputed or pooled across incompatible packets.

SCOPE AND TRACEABILITY

analysis_index.csv gives every retained study R script's purpose and status.
source_index.csv maps all original copies to retained scripts and records
their original SHA-256 hashes. checks/file_checksums.csv records the packaged
files after verification. Original source files outside this collection were
not edited. The collection begins with saved criterion ratings and response
metrics; it does not reproduce the original model-generation or judge calls.
