---
title: "Downloads"
subtitle: "Exercise files, solution files, and Shiny app templates"
---
## How to Use These Files
1. **Right-click** on the download link and select **"Save link as..."**
2. Save the `.qmd` file to your workshop project folder
3. Open the file in **RStudio**
4. Run code chunks using the green **play button** (▶)
Exercise files contain tasks with blank spaces (`___`) for you to fill in. Solution files contain completed code with interpretations.
## Day 1 — Decision Trees
### Session 3: GDM Diagnostic Decision Tree
| File | Description |
|---|---|
| [gdm-exercise.qmd](day1/session3-gdm-diagnostic-tree/gdm-exercise.qmd) | Exercise: Modify prevalence, OGTT cost, DIPSI sensitivity, run sensitivity analysis |
| [gdm-solution.qmd](day1/session3-gdm-diagnostic-tree/gdm-solution.qmd) | Solution: Completed tasks with interpretations |
| [GDM-Screening-Model.xlsx](day1/session3-gdm-diagnostic-tree/GDM-Screening-Model.xlsx) | Excel model: 3 screening strategies with all formulas (for cross-validation with R) |
| [GDM-Worksheet.docx](day1/session3-gdm-diagnostic-tree/GDM-Worksheet.docx) | Pen-and-paper worksheet: Diagnostic tree concepts by hand (test accuracy, costs, QALYs, ICER, NMB) |
| [gdm-rdecision-package.qmd](day1/session3-gdm-diagnostic-tree/gdm-rdecision-package.qmd) | Bonus: Same model built with `rdecision` package — includes PSA, CE plane, CEAC |
### Session 4: DES vs BMS Therapeutic Decision Tree
| File | Description |
|---|---|
| [des-bms-exercise.qmd](day1/session4-des-bms-therapeutic-tree/des-bms-exercise.qmd) | Exercise: Cross-validate R vs Excel, pre-regulation prices, restenosis scenarios, sensitivity analysis |
| [des-bms-solution.qmd](day1/session4-des-bms-therapeutic-tree/des-bms-solution.qmd) | Solution: Completed tasks with interpretations |
| [DES-vs-BMS-Decision-Tree-Model.xlsx](day1/session4-des-bms-therapeutic-tree/DES-vs-BMS-Decision-Tree-Model.xlsx) | Excel model: 4-sheet decision tree with all formulas (for cross-validation with R) |
| [DES-BMS-Worksheet.docx](day1/session4-des-bms-therapeutic-tree/DES-BMS-Worksheet.docx) | Pen-and-paper worksheet: Decision tree concepts by hand (pathway counts, MACE, costs, ICER, NMB) |
| [des-bms-rdecision-package.qmd](day1/session4-des-bms-therapeutic-tree/des-bms-rdecision-package.qmd) | Bonus: Same model built with `rdecision` package — includes tree drawing, tornado, PSA, CE plane, CEAC |
## Day 2 — Markov Model and PSA
### Session 5: CKD 4-State Markov Model
| File | Description |
|---|---|
| [ckd-exercise.qmd](day2/session5-ckd-markov/ckd-exercise.qmd) | Exercise: Cross-validate R vs Excel, time horizon, treatment effect, dialysis cost, two-way sensitivity |
| [ckd-solution.qmd](day2/session5-ckd-markov/ckd-solution.qmd) | Solution: Completed tasks with interpretations |
| [CKD-Markov-Model.xlsx](day2/session5-ckd-markov/CKD-Markov-Model.xlsx) | Excel model: Parameters, transition matrices, Markov trace, cost-effectiveness (for cross-validation with R) |
| [Markov-Worksheet.docx](day2/session5-ckd-markov/Markov-Worksheet.docx) | Pen-and-paper worksheet: Markov modelling concepts by hand (transition matrix, matrix multiplication, HCC, ICER) |
| [ckd-markov-heemod.qmd](day2/session5-ckd-markov/ckd-markov-heemod.qmd) | Bonus: Same model built with `heemod` package — includes built-in Markov trace, tornado DSA, PSA, CE plane, CEAC |
### Session 6: Probabilistic Sensitivity Analysis
| File | Description |
|---|---|
| [psa-exercise.qmd](day2/session6-psa/psa-exercise.qmd) | Exercise: Iteration count, uncertainty propagation, EVPI |
| [psa-solution.qmd](day2/session6-psa/psa-solution.qmd) | Solution: Completed tasks with interpretations |
## Day 3 — Partitioned Survival and Shiny Apps
### Session 8: Breast Cancer Partitioned Survival Model
| File | Description |
|---|---|
| [breast-cancer-exercise.qmd](day3/session8-breast-cancer-psm/breast-cancer-exercise.qmd) | Exercise: Time horizon, biosimilar pricing, 9-week regimen, distribution comparison |
| [breast-cancer-solution.qmd](day3/session8-breast-cancer-psm/breast-cancer-solution.qmd) | Solution: Completed tasks with interpretations |
| [Breast-Cancer-PSM.xlsx](day3/session8-breast-cancer-psm/Breast-Cancer-PSM.xlsx) | Excel model: Survival curves, state occupancy, cost-effectiveness with all formulas (for cross-validation with R) |
| [PSM-Worksheet.docx](day3/session8-breast-cancer-psm/PSM-Worksheet.docx) | Pen-and-paper worksheet: PSM concepts by hand (state occupancy, area-under-curve, ICER, NMB) |
### Session 9: PSA for the Breast Cancer Model
| File | Description |
|---|---|
| [psa-psm-exercise.qmd](day3/session9-psa-psm/psa-psm-exercise.qmd) | Exercise: Cost uncertainty, probability of cost-effectiveness at multiple WTP thresholds |
| [psa-psm-solution.qmd](day3/session9-psa-psm/psa-psm-solution.qmd) | Solution: Completed tasks with interpretations |
## Shiny App Templates
These are standalone R Shiny applications. To run them:
1. Download the `app.R` file into a folder
2. Open it in RStudio
3. Click **"Run App"** (or run `shiny::runApp()` in the console)
| App | Description |
|---|---|
| [Diagnostic Tree app.R](shiny-apps/diagnostic-tree/app.R) | GDM screening: 3 strategies, NMB ranking, real tornado DSA, CE plane |
| [Therapeutic Tree app.R](shiny-apps/therapeutic-tree/app.R) | DES vs BMS: cost breakdown, break-even analysis, NMB |
| [Markov Model app.R](shiny-apps/markov-model/app.R) | CKD Markov: trace plots, tornado DSA, **PSA with CE plane + CEAC** |
| [Partitioned Survival app.R](shiny-apps/partitioned-survival/app.R) | Breast cancer PSM: Weibull survival, distribution comparison, NMB |