Summary
No response
Details
Summary
Add a new Chapter 15/16 style case study for epidemiology:
- Simulate a simple binary exposure / binary outcome dataset with strata
(e.g., age group).
- Provide an analysis script that computes:
- crude risk ratio,
- stratum-specific risk ratios,
- and a pooled / adjusted risk ratio (e.g., Mantel–Haenszel).
This issue is for building the basic simulator + analyzer skeleton.
We can refine the statistics and narrative in later issues.
Files to add
scripts/sim_epi_rr_strata.py – simulator for stratified 2×2 tables
scripts/chXX_epi_rr_strata.py – analyzer (chapter number TBD; use XX for now)
- Makefile targets:
- Tests:
Goals
Hints
- Look at the existing pattern for Ch13/Ch14/Ch15:
- simulator script → CSV in
data/synthetic/
- analyzer script → summaries/plots in
outputs/...
- For a first pass, you can use simple formulas from standard epi texts,
or even rely on statsmodels if convenient.
- Keep everything small, clear, and easily extended in follow-up issues.
Difficulty
Medium: good first issue for someone interested in biostats/epidemiology
and comfortable with basic Python and 2×2 tables.
Files to Touch
No response
Contributor Checklist
Summary
No response
Details
Summary
Add a new Chapter 15/16 style case study for epidemiology:
(e.g., age group).
This issue is for building the basic simulator + analyzer skeleton.
We can refine the statistics and narrative in later issues.
Files to add
scripts/sim_epi_rr_strata.py– simulator for stratified 2×2 tablesscripts/chXX_epi_rr_strata.py– analyzer (chapter number TBD; use XX for now)epi-rr-ci(small n, CI smoke)epi-rr(full demo)tests/test_cli_smoke.py.Goals
id,stratum,exposed(0/1),outcome(0/1)--dataor--datadirinput and compute:scripts/_cli.py) for argument parsing.Hints
data/synthetic/outputs/...or even rely on
statsmodelsif convenient.Difficulty
Medium: good first issue for someone interested in biostats/epidemiology
and comfortable with basic Python and 2×2 tables.
Files to Touch
No response
Contributor Checklist
CONTRIBUTING.md.make lintlocally.make testlocally.