Published December 31, 2023 | Version v1
Journal article Embargoed

HeMoVal - Analysis code

  • 1. ROR icon University of Zurich
  • 2. ROR icon University Hospital of Zurich

Description

This repository contains the full analysis code for the HeMoVal study, a preregistered multicentre prospective observational cohort study of patients with aneurysmal subarachnoid haemorrhage.

The primary analysis was conducted strictly according to the prespecified statistical analysis plan (SAP; https://doi.org/10.1186/s12883-022-02789-w). The corresponding code is implemented in HeMoVal_data_analysis.Rmd and was developed by the study team (KA, RMB). As part of formal quality control, the statistical analysis was independently verified for correctness and reproducibility by statisticians (DK, UH), including independent recoding of the primary outcome and reproduction of the primary analysis.

The analysis workflow is documented in the following R Markdown notebooks:

  • HeMoVal_data_analysis.Rmd: implementation of all prespecified primary analyses according to the SAP.
  • HeMoVal_data_analysis_01_recoding-primary-endpoint.Rmd: independent recoding of the primary outcome and reproduction of the primary analysis by statisticians.
  • HeMoVal_data_analysis_02_additional_exploratory.Rmd: exploratory and secondary analyses extending beyond the prespecified SAP, including center-specific generalized additive models with a linear log(HbMet) term interpreted as a log odds ratio.
  • HeMoVal_data_analysis_03_additional_metHb.Rmd: analyses applying the same modelling framework as the prespecified primary analysis, with methaemoglobin substituted for oxyhaemoglobin as the biomarker of interest.

All analyses are fully scripted and reproducible using the accompanying deidentified datasets. Exploratory analyses are clearly separated from prespecified analyses and explicitly labelled as such.

Software environment

Analyses were performed in R (version 4.5.2) on a Linux platform (Ubuntu 24.04.3 LTS, x86_64-pc-linux-gnu). A complete session information file, including package versions and dependencies, is provided in the repository to support computational reproducibility.

Files

Embargoed

The files will be made publicly available on December 31, 2026.

Reason: Article under review.

Additional details

Software

Programming language
R