# NOT RUN {
library(INLA)
data(Epil)
##Define the model
formula = y ~ Trt + Age + V4 +
f(Ind, model="iid") + f(rand,model="iid")
result = inla(formula, family="poisson", data = Epil, control.predictor = list(compute = TRUE))
plot_random_effects(result)
plot_random_effects(result, type = 'boxplot')
plot_fixed_marginals(result)
plot_hyper_marginals(result)
# }
Run the code above in your browser using DataLab