The rest of my code for specifying my grids locations and other ''statck object ''' is as follows:
x.lim <- range(coords[,1]) # range of x coordinate of villages
y.lim <- range(coords[,2]) # y range
grid.x <- 37 # row number
grid.y <- 36 # col number
pred.grid <- expand.grid(x = seq(x.lim[1], x.lim[2], length.out = grid.x),
y = seq(y.lim[1], y.lim[2], length.out = grid.y))
pred.grid <- as.matrix(pred.grid)
dim(pred.grid) # 1332 cells
A.pred <- inla.spde.make.A(mesh = mesh, loc = pred.grid)
inf.stack.est <- inla.stack(data = list(y = data.sc$N_infec, Ntrials = data.sc$N_tested),
A = list(A.est, 1, 1, 1, 1, 1, 1, 1),
effects = list(c(s.index, list(Intercept =1)),
list(ben_ppp = data.sc$ben_ppp),
list(bio1_wc30s = data.sc$bio1_wc30s),
list(bio12_wc30s = data.sc$bio12_wc30s),
list(bio4_wc30s = data.sc$bio4_wc30s),
list(mimq_wc30s = data.sc$mimq_wc30s),
list(dst_coastlin = data.sc$dst_coastlin),
list(ID = data.sc$ID)),
tag ="est")
stack.pred.latent <- inla.stack(data = list(xi = NA),
A = list(A.pred),
effects =list(s.index),
tag ="pred.latent")
stack.pred.rsp <-
inla.stack (... ) # as defined above
join.inla.inf <- inla(formula, data =inla.stack.data(join.stack.inf),
Ntrials = join.data.inf$Ntrials,
control.family =list(link ="logit"),
control.predictor =list(A =inla.stack.A(join.stack.inf, spde=spde),
compute =TRUE, link=1))
Questions
1) How may I fix the above error ? May I reduce the number of my grids cells ?
2) Without covariates in prediction stack object, I obtained a prediction of prevalence that is around 0.49999 over all the study region and the DIC=221.57 (close to 221.02 for model without spatial component).
Is because there is no spatial effect on my data I have such strange outcome ?
3) Is possible to fit a ''bym'' model to data in INLA as alternative using the distance between points for contructing the ''graph'' file ? How to obtain a finer map of prediction of prevalence oer the study region by doing like that ?
Any help will be very apprecieted.
Kind regards.
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/5b5360e3-7f1c-49c4-be3b-ac761a768cf2n%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "R-inla discussion group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/r-inla-discussion-group/Ahrs9q0YU6Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to r-inla-discussion...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/CANnc31DpeOLFBYcvXaXVdyeicHgNue22cU1V6k4LrK%3DV65COhw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/81d62578-d1fd-4f99-b8ab-14438a520791n%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/CAA0dk0ETv7BiQozGCUfCvBJ6aeKUCg3DPmkN5b6P8xpBC-HgxQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/34239ba5-8ba1-4c21-8650-7c5dcf54bb0fn%40googlegroups.com.