## example based on simulated built-in data
dat <- fusionData(dataGeo, lungfunction ~ covariate,
dataLattice, mortality ~ covariate,
dataPP, distribution = c("normal","poisson"),
domain = dataDomain,
method = "INLA")
if (FALSE) {
if (require("INLA", quietly = TRUE)) {
## fit a spatial fusion model on the prepared data
## pp.offset = 400 was chosen based on simulation parameters
mod <- fusion(data = dat, n.latent = 1, bans = 0, pp.offset = 400,
prior.range = c(0.1, 0.5), prior.sigma = c(1, 0.5),
mesh.locs = dat$locs_point, mesh.max.edge = c(0.5, 1))
## parameter estimates
summary(mod)
}
}
Run the code above in your browser using DataLab