Hi all,
I'm wondering what is the best way to get posterior predictions from smooth terms using INLA.
I have the following model, with two terms modeled as splines
formula.random <-y ~ f(x1, model = "rw1")+f(x2 model = "rw1",hyper=prec.prior)+x3+x4+
f(ID = "iid",hyper=prec.prior) +
f(SP, model="iid",hyper=prec.prior) +
f(M, model="iid",hyper=prec.prior2) #+
r.inla.band1 <- inla(formula.random,
family ="beta",
data=data2,
verbose=TRUE,
control.compute=list(dic=TRUE, cpo=TRUE, waic=TRUE),
control.family=list(link='logit'),
control.predictor=list(link=1, compute=TRUE))
The model ran without issue. What I want to do now is calculate the first derivative across each spline and look for areas where a rate of change of 0 is excluded from the credible interval. In other modeling platforms I would make posterior predictions from the spline and use the method of finite differences to calculate the derivative. I'm not sure how to implement this using INLA.
Any advice is much appreciated!
Shauhin