
120 Bayesian Methods in Health Economics
If the model considers more than just one variable to be initialised, it is
easy to extend the definition of the function inits by including in the list
comma-separated suitable values for the other variables. For example, if the
model included a further unobserved random node mu represented by a vector
of size 10 and associated with a Normal distribution, then a suitable code
would be:
inits <- function(){list=(theta=runif(1),mu=rnorm(10))}
In this case, R would generate 10 values from a standard Normal distribution
thatwouldbeusedbyJAGS to initialise the node mu.
The last part of the pre-processing operation