Dirichlet Distribution & Log-Logistic Survival
Source:vignettes/dirichlet-loglogistic.Rmd
dirichlet-loglogistic.RmdOverview
Standard PSA uses Beta (utilities) and Gamma (costs). Two common modelling situations need specialised distributions: multinomial transition probabilities require the Dirichlet to maintain row-sum constraints, and diseases with hump-shaped hazards need the Log-Logistic survival model.
Part A: Dirichlet for Transition Matrices
The Problem
You are building a 3-state Markov model for Chronic Kidney Disease (Stable -> Progressed -> Dead). From a cohort of 200 patients observed for 1 year starting in “Stable”:
- 150 remained Stable
- 35 progressed to CKD Stage 4
- 15 died
These three probabilities (0.75, 0.175, 0.075) must sum to 1.0 in every PSA iteration. If you sample them independently using three Beta distributions, they will almost never sum to 1 – breaking the model.
The Dirichlet Solution
The Dirichlet distribution is the multivariate generalisation of the Beta. Its parameters are the observed counts:
Each sample from a Dirichlet is a complete probability vector that sums to exactly 1.0.
Sampling via Gamma Decomposition
ParCC uses the standard algorithm:
- Draw for each state
- Compute
- The resulting is Dirichlet-distributed and sums to 1
In ParCC
- Navigate to Uncertainty (PSA) and select Dirichlet (Multinomial).
- Enter counts: 150, 35, 15.
- Enter labels: Stable, Progressed, Dead.
- Click Fit & Sample.
ParCC displays the Dirichlet parameters, mean proportions, a bar chart of sampled proportions, and a ready-to-use R code snippet for your PSA loop.
When to Use Dirichlet vs Independent Betas
| Situation | Use |
|---|---|
| Single probability (e.g., utility, event rate) | Beta distribution |
| Two mutually exclusive outcomes | Beta (one parameter determines both) |
| Three or more mutually exclusive outcomes | Dirichlet – guarantees row-sum = 1 |
| Transition matrix row in a Markov model | Dirichlet for each row |
Part B: Log-Logistic Survival
The Problem
You are modelling recovery after hip replacement surgery. The hazard of revision is:
- Low immediately after surgery (close monitoring)
- Peaks around year 5-7 (implant loosening)
- Declines after year 10 (survivors have well-fixed implants)
Neither Exponential (constant hazard) nor Weibull (monotonic hazard) can capture this hump-shaped pattern.
The Log-Logistic Distribution
The survival function is:
The hazard function is:
When , the hazard rises to a peak then falls – exactly the hump shape needed.
In ParCC
From a published Kaplan-Meier curve, identify two time-survival points:
- Point 1: At Year 5, implant survival = 92%
- Point 2: At Year 15, implant survival = 78%
- Navigate to Survival Curves > Fit Survival Curve.
- Select method: Log-Logistic (From 2 Time Points).
- Enter the values.
- ParCC solves for alpha (scale) and beta (shape).
- Verify beta > 1 in the output to confirm the expected hump-shaped hazard.
Calibration Method
ParCC uses the log-odds transformation. Since :
Two points yield two equations, solved for alpha and beta.
References
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford University Press; 2006. Chapter 4: Probabilistic Sensitivity Analysis.
- Collett D. Modelling Survival Data in Medical Research. 3rd ed. Chapman & Hall/CRC; 2015. Chapter 5: Log-Logistic Models.
- NICE Decision Support Unit Technical Support Document 14: Survival Analysis for Economic Evaluations Alongside Clinical Trials. 2013.