 R/JAGS code to run the examples (all files at once here)
 Instructions (probably best to read before downloading the files)
 Utilities
 Utils.R: script containing some utility functions, for examples to draw traceplots of MCMC chains, or estimating the parameters of suitable distributions to obtain given values for its mean and standard deviation [Needed to run most of the other scripts]
 Chapter 2
 MCMC.R: script to run the Gibbs sampling simulations and check convergence, as in Figure 2.10
 modelNormal.R: script to run the analysis of the Normal model (pages 6973)
 modelNormal.txt: JAGS code for the Bayesian model (pages 6973)
 phbirths.dta: Dataset used for the Normal model example  courtesy of German Rodriguez
 Chapter 3
 HEexample.R: script to run the Bayesian model to analyse the health economic problem described in the chapter (chemotherapy) and the several costeffectiveness analyses presented throughout the chapter. This example is used throughout chapter 4 as well
 model.txt: JAGS code for the basic costeffectiveness analysis
 modelEVPPI_rho.txt: JAGS code for the analysis of the Expected Value of Partial Perfect Information (EVPPI) for the parameter ρ
 modelEVPPI_gamma.txt: JAGS code for the analysis of the Expected Value of Partial Perfect Information (EVPPI) for the parameter γ
 Chapter 4
 modelNormal.R: script to run the analysis of the Normal model (pages 129141); continues the analysis from chapter 2
 modelNormalBlocking.txt: JAGS code to run the model using blocking to improve convergence (page 133)
 modelNormal2.txt: JAGS code to run the compute the predictive distribution (page 135)
 Chapter 5
 Example 1: RCT of acupuncture for chronic headache in primary care
 acupuncture.R: script to run the costeffectiveness analysis of acupuncture. Based on this paper
 dataRCTacupuncture.csv: Dataset used for the acupuncture example  courtesy of David Wonderling, Richard Nixon and Richard Grieve
 actptRCT.txt: JAGS code to run the normal/normal (on the logit/log scale) model
 actptRCT_gamma.txt: JAGS code to run the normal/gamma (on the logit/natural scale) model
 actptRCT_logN.txt: JAGS code to run the normal/lognormal (on the logit/natural scale) model
 Example 2: Neuraminidase inhibitors to reduce influenza in healthy adults
 EvSynth.R: script to run the costeffectiveness analysis based on evidence synthesis for the influenza treatment with neuraminidase
 EvSynth.txt: JAGS code to run the evidence synthesis model
 Example 3: Markov model for the treatment of asthma
 MarkovModel.R: script to run the costeffectiveness analysis for the treatment of asthma
 MarkovModel.txt: JAGS code to run the conjugated Markov model
 
