# Beating the Blues public-release reanalysis Prepared by DASS, 2026-10-25. Reproducible public-release reanalysis; not a clinical replication. This package reproduces DASS's analysis of the 100-record HSAUR3 teaching release. How those records were selected from the cited 167-person trial is unresolved. It does not reproduce the original clinical paper's exact analysis or estimate a full-trial ITT effect. Later visits are exploratory. Computational agreement does not establish the missing-at-random (MAR) assumption or model adequacy. ## Contents - `reproduce.py`: an adapter around unchanged numerical Python and R source files, with strict comparisons to frozen aggregate outputs. - `code/`, `r_scripts/`: numerical source used in the verified local analysis. The complete internal review application, signing tools and reports are excluded. - `plans/`, `METHODS.md`: explicit analysis specifications and missing-outcome sensitivity target. - `expected/`: aggregate results and bootstrap fitted parameters, without patient rows or resampling indices. These are reference calculations, not additional independent clinical evidence. - `figure/`: plot, plotting code, and the four-visit results table. - `software.json`, `requirements.txt`, `renv.lock`: pinned analysis versions. `CHECKSUMS.json` covers every package member except itself. - `REPLAY_VALIDATION.json`: completed primary and full download-replay checks against the pinned existing dependencies. A clean dependency installation on a second machine has not been tested. Participant records, the upstream package archive and clinical-paper text are not redistributed. Fetch the original public sources separately. Keep downloaded patient rows and generated row exports local. ## Supported environment and preparation The analysis was run on Linux with Python 3.12.3, R 4.4.3, NumPy and SciPy versions in `requirements.txt`. The R scripts also use jsonlite, sandwich and nlme versions in `software.json` and `renv.lock`. BLAS differences may affect the strict comparison; do not loosen tolerances silently if that happens. Linux must permit unprivileged user/network namespaces; Windows users need a compatible Linux environment such as WSL2. Do not run under a network namespace until dependencies and public sources have been acquired. Create a Python 3.12 virtual environment, activate it, then install: ```sh python -m pip install -r requirements.txt ``` Use R 4.4.3. Install renv 1.3.1 (the version recorded in the lockfile), then restore only the required packages from this supplied lockfile: ```sh Rscript --vanilla -e 'dir.create("renv/library", recursive=TRUE, showWarnings=FALSE); renv::restore(lockfile="renv.lock", library="renv/library", packages=c("jsonlite","sandwich","nlme"), prompt=FALSE)' ``` The package does not install R, Python, system libraries or a container image. Dependency installation and source acquisition require network access and are separate from estimation. ## Verify and acquire ```sh python reproduce.py check python reproduce.py fetch ``` The fetch command checks both the pinned CRAN archive and commit-pinned mirror, verifies their hashes, and confirms that their R data agree. It writes `data/` only after both sources validate. Network/source failure stops acquisition; it does not use an unchecked cache. Source attribution and hashes are in `SOURCE.json`. HSAUR3 1.0-16 declares GPL-2. The upstream licence continues to apply to upstream material obtained separately; this package does not relicense it. ## Offline numerical replay Run from the unpacked package folder, with the Python environment active and Rscript on PATH: ```sh unshare -Urn env LOCAL_ONLY=true no_proxy='*' OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 python reproduce.py primary unshare -Urn env LOCAL_ONLY=true no_proxy='*' OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 python reproduce.py full ``` `primary` refits the two-month HC3 ANCOVA in Python/R and the longitudinal primary likelihood in Python. It does not run the longitudinal R bootstrap. `full` independently refits all 999 recorded-seed patient resamples in both languages, recomputes all 25 sensitivity scenarios, and checks the supplementary R optimizer. Each command creates a new output directory and refuses to overwrite it. Archive or rename an earlier output directory before rerunning. Full replay can take several minutes or longer. The comparison requires both absolute error <= 1e-10 and relative error <= 1e-6 with the stated near-zero floor. The separate R gls optimizer check retains its original 1e-5 contrast and 1e-7 likelihood bounds. The adapters do not render or sign reports. Figure regeneration is separate: ```sh R_LIBS_USER=renv/library Rscript --vanilla figure/plot.R expected/longitudinal_results.json figure/results ``` ## Interpretation The longitudinal model uses visit-specific treatment and baseline terms and a common unstructured covariance. All 100 records define the cohort; 97 contribute observed follow-up information, totaling 280 measurements. The two-month estimate is -3.95 points with a 95% bootstrap interval of [-7.13, -0.77]. At eight months the estimate is -1.54 [-5.16, 2.42]. These are different visit-specific estimates, not a test of a treatment-by-time interaction. MAR and the illustrative delta shifts do not resolve selection into the released subset. See `METHODS.md` for the complete specification and remaining limits. ## Attribution and use Original study: Proudfoot et al. (2003), Psychological Medicine 33(2), 217–227, DOI 10.1017/S0033291702007225. Public teaching release: Hothorn and Everitt, HSAUR3 1.0-16, BtheB. DASS prepared the reanalysis, adapter, figure and explanatory material; DASS was not the original trial team. DASS-authored source is supplied for inspection and reproduction of this case study. Broader redistribution or reuse terms for that source are not specified by this draft. No third-party software, R packages, clinical paper, or participant dataset is bundled. No clinical or funding endorsement is implied.