Stack with data for estimation and prediction

Defining the observations & their offset:

y.obs <- rep(0:1, c(nmesh, n))
e.obs <- c(w, rep(0, n)) # areas!!

Stack for estimation:

stk.e <- inla.stack(
  tag = "est",
  data = list(y = y.obs, e = e.obs),
  A = list(1, A.obs),
  effects = list(
    list(b0 = rep(1, nmesh + n)),
    list(s = 1:nmesh)
  )
)