Hi everyone!
I am adjusting a spatial model, specifically a BYM model, and i am curious about the differences between using the following specifications "besag and iid," "bym," and "bym2." I have fitted the same model with these different specifications, and I have observed variations in the coefficients. I am unsure about how to interpret these differences and why they are occurring. here's an example with the london suicides dataset:
"Bym2"
formula <- y ~ 1 + f(ID, model="bym2", graph=LDN.adj)
mod <- inla(formula,family="poisson",data=data,E=E,
control.compute=list(return.marginals.predictor=TRUE,dic=TRUE,waic=TRUE,cpo=TRUE))
summary(mod)
"bym"
formula2 <- y ~ 1 + f(ID, model="bym", graph=LDN.adj)
mod2 <- inla(formula2,family="poisson",data=data,E=E,
control.compute=list(return.marginals.predictor=TRUE,dic=TRUE,waic=TRUE,cpo=TRUE))
summary(mod2)
"besag/iid"
formula3 <- y ~ 1 + f(ID, model="besag", graph=LDN.adj)+f(ID2, model = "iid")
mod3 <- inla(formula3,family="poisson",data=data,E=E,
control.compute=list(return.marginals.predictor=TRUE,dic=TRUE,waic=TRUE,cpo=TRUE))
summary(mod3)
Results for the 3 models:
> mod$summary.hyperpar
mean sd 0.025quant 0.5quant 0.975quant mode
Precision for ID 17.9088117 5.3525995 9.48887868 17.2166760 30.3819795 NA
Phi for ID 0.4669166 0.2406966 0.07094782 0.4545469 0.9099025 NA
> mod2$summary.hyperpar
mean sd 0.025quant 0.5quant 0.975quant mode
Precision for ID (iid component) 54.24477 31.100650 16.249344 47.06699 141.95641 NA
Precision for ID (spatial component) 13.55155 7.260619 4.126922 11.94525 33.25437 NA
> mod3$summary.hyperpar
mean sd 0.025quant 0.5quant 0.975quant mode
Precision for ID 18.87020 13.61775 4.832256 15.16596 54.78097 NA
Precision for ID2 54.23518 33.22181 17.146640 45.70741 141.30057 NA
I understand that these differences in coefficients are likely related to the properties of the distribution used in each specification, but I'm not entirely certain.
I hope that somebody can help me!! thank you so much