Analysis code for the study of small vulnerable newborn (SVN) outcomes across two tertiary neonatal units in Malawi and Zimbabwe (Neotree, Kamuzu Central Hospital and Sally Mugabe Central Hospital, 2022-2025). Includes a run_all.R script to reproduce every table and figure from the data (not included — see input/README.md).
# small-vulnerable-newborns
Analysis code for the study **"Small vulnerable newborn outcomes across
Malawi and Zimbabwe: secondary analysis of a prospective neonatal cohort"**
(Neotree, Kamuzu Central Hospital and Sally Mugabe Central Hospital,
2022-2025).
This repository contains the complete R analysis pipeline so that every
table and figure in the manuscript is reproducible. The underlying clinical
data are confidential and are **not** included — see
DATA_AVAILABILITY.md.
## What the study does
Compares the INTERGROWTH-21st small-vulnerable-newborn (SVN) framework
(Term-AGA, Term-SGA, Preterm-AGA, Preterm-SGA) against birth-weight-alone
(low birth weight, LBW) classification for describing outcomes among live
births and neonatal-unit admissions, examines independent predictors of
neonatal death (univariable and multivariable), and tests whether SVN
classification derived from routinely estimated gestational age holds up
when validated against an ultrasound-dated subset.
## Repository layout
```
scripts/ All R analysis and figure scripts
input/ Confidential data goes here (not committed) -- see input/README.md
output/ Pipeline outputs land here (not committed)
run_all.R Runs the whole pipeline end to end
FIGURE_TABLE_SOURCES.md Map of each manuscript table/figure -> source script
DATA_AVAILABILITY.md Data/code availability statement and access terms
```
## Pipeline
- Every script sources `scripts/00a_setup_shared.R`, which defines the
INTERGROWTH-21st SGA lookup, SVN classification, plausible-range
outlier handling, colour palettes, plotting theme, and the six data-file
paths (all resolved relative to the script's own location, so the repo
can be cloned anywhere).
- Most scripts read only the raw `input/` data. A small number of
`Figure_*`/`helper_*` scripts read a CSV written by an earlier
`Table_*`/`dep_*` script in the same run — `run_all.R` runs everything in
the correct order …