158 Bayesian Methods in Health Economics
sigma.e[t] <- exp(logsigma.e[t])
# Prior distributions
mu.c[t] ~ dnorm(0, 1.0E-6) # mean costs (log scale)
logsigma.c[t] ~ dunif(-5,10) # log st. dev. for costs
mu.e[t] ~ dnorm(0, 1.0E-6) # mean QALY (logit scale)
logsigma.e[t] ~ dunif(-5,10) # log st. dev. for QALYs
beta[t] ~ dunif(-5, 5) # regression between (e,c)
}
}
Notice that we need to define the nodes lambda[t] to model the precision of
the conditional distributions for c
∗
it
. Obviously, its value is set to the reciprocal
of the conditional variance.
Wesavethecodeinthefileacupt.txt and run the model in JAGS using
the following code.
library(R2jags)
dataJags <- list("n","c0","c1","e0","e1")
filein <- "acuptRCT.txt"
params <- c("mu.c","mu.e","beta","sigma.e","sigma ...