Skip to content

Course materials

Everything the worked example in lessons 3 to 6 uses. Download the data and the scripts and rerun the analysis yourself.

Data

File What it is
cancer_treatment.csv Fifteen mice in four groups — two controls, two treatments — and the day each died. Semicolon-delimited.

Scripts

File What it does
survival_analysis.py Kaplan–Meier curves and the five pairwise log-rank tests, with the Bonferroni correction and the day-50 censoring made explicit.
ph_check.py The log–log diagnostic for the proportional hazards assumption.

Both scripts need pandas, numpy, matplotlib and lifelines:

pip install pandas numpy matplotlib lifelines
python3 survival_analysis.py

Figures

File What it is
km_curves.png The survival curves as first drawn.
km_curves_journal.png · PDF The same figure at 88 mm single-column, 7 pt Arial, fonts embedded.
ph_check_loglog.png · PDF The log–log diagnostic plot.
dellacqua_jagged_frontier.png The jagged frontier, reproduced in lesson 8. Figure 1 of Dell'Acqua et al. (2023), Harvard Business School Working Paper 24-013 — not our figure, and reproduced here for teaching.

Skills

A Skill is a Markdown file that records how you want a job done, so the agent does it that way next time. The three used in this course:

Papers referred to

The lessons cite the literature by DOI rather than reproducing the PDFs here.