WinBUGS code for cost-effectiveness modelling
This page contains the WinBUGS 1.4 code and data to reproduce the base case analysis presented in the paper "Structural and parameter uncertainty in Bayesian cost-effectiveness models" (Jackson, C. H., Sharples, L. D., Thompson, S. G.)
BUGS model code
- Model code:
agepw_model.txt - Data files:
icd-dat-age-mn-complete.txt, icd_ce_nice_data.txt - Initial values:
agepw_mn_complete_inits.txt - Script:
agepw_script.txt. The file paths in this script should be edited according to the place where you put the model, data and initial values.
WBDev
The model code contains a new BUGS function, CE(), for
calculating the expected cost and effectiveness from a Markov model in
terms of multinomial logistic regression parameters (baseline log odds
for the state on the next day, and log odds ratios for covariates
governing the transition probabilities).
This allows the complex matrix multiplications involved in the cost-effectiveness calculation to be performed very quickly, compared to writing them in BUGS model code.
To use this new function, you must first install the WBDev interface, available from the WinBUGS Development site. This allows users to write new logical functions and univariate distributions for use in BUGS model code.
Then place the following files, CE.ocf, CEUtils.ocf, into the WBDev/Code
directory under the WinBUGS installation directory, usually
c:/Program Files/WinBUGS14. These are binary compiled
code files.
If you want to look at the source code for these, written in Blackbox Component Pascal, this is available in CE.odc, CEUtils.odc. In case you want to modify and recompile them, the WBDev manual explains how to write your own code using Blackbox Component Pascal.

