Biostatistics and Econometrics for Health Data
Skewed costs, counts, survival and extrapolation, competing risks, survey weights, utilities, multiple imputation and panel models on claims.
Tools
Module capstone
Burden-of-illness report by province
The 10 days
About this module
Module 1 ended with a clean cohort and its costs. Module 2 asks the statistical questions an HTA or RWE team asks of those files. How much does a person with heart failure cost, on average? How often do people see a doctor or go to hospital? How long until they are admitted, or die? Health data break the textbook assumptions. Costs are skewed, many people have zero, counts vary more than Poisson allows, and follow-up ends before the event for most people. Each day takes one of these problems, fits the standard models in Python, checks them in R, and, where the generator allows, checks them against the true answer.
What you build in Days 11–13
| Day | You build | You learn |
|---|---|---|
| 11 | corridor/m2.py (the Module 2 analysis file), corridor/costmodels.py, corridor/sim.py | Why OLS on log costs gives the wrong budget, Duan's smearing, gamma GLMs, the modified Park test, out-of-sample model choice |
| 12 | Two-part and count models in corridor/costmodels.py | Zeros and two-part models, the extensive and intensive margins, Poisson with an offset, overdispersion and the negative binomial |
| 13 | corridor/survival.py | Censoring, Kaplan–Meier by hand, the log-rank test, Cox models, checking proportional hazards |
New Python packages (add them to your environment): pip install statsmodels==0.15.0 scipy==1.18.1. R needs MASS and survival, which come with R.
What you build in Days 14–16
| Day | You build | You learn |
|---|---|---|
| 14 | corridor/trial.py (the Renavex trial extract), corridor/parametric.py | Parametric survival models, why AIC cannot pick an extrapolation, borrowing the hazard's shape from external data, restricted mean survival, survival scenarios for an HTA model |
| 15 | corridor/competing.py, corridor/markov_preview.py | Cumulative incidence with competing risks, cause-specific and Fine–Gray models, the illness–death model, turning rates into Markov transition probabilities |
| 16 | corridor/survey.py | Survey weights, bootstrap replicate weights, design effects, domain estimates, Statistics Canada release flags, weighted regression |
New data (Day 14): run python data/make_data.py again. It adds the Renavex pivotal trial extract and a CCHS-style survey, about 10 seconds on top of the usual run. Every earlier file comes out byte-identical. New R packages: install.packages(c("flexsurv", "survey")).
What you build in Days 17–19
| Day | You build | You learn |
|---|---|---|
| 17 | corridor/eq5d.py (Canadian EQ-5D-5L value set, response mapping), trial.visits() | The EQ-5D-5L descriptive system, scoring with the Canadian value set, direct and response mapping, health-state utilities with clustered SEs |
| 18 | corridor/missing.py (MICE with predictive mean matching, Rubin's rules) | MCAR, MAR and MNAR; complete-case bias; multiple imputation within arms; delta-adjustment sensitivity analysis |
| 19 | corridor/panel.py (person-year panel, fixed effects, clustered SEs) | Pooled OLS vs person fixed effects, clustered standard errors, event studies, diagnosis date vs onset |
New data (Day 17): run python data/make_data.py again. It adds renavex_trial_visits.csv: the trial's visits at months 0, 12 and 24, with EQ-5D-5L answers, a kidney symptom score and 12-month costs, and the gaps a real trial has. Every earlier file comes out byte-identical. New R packages: install.packages(c("mice", "fixest")).