Thank you for your feedback.
As I understand it, I use the spline as a form of correction (like what we do when adjusting for an association with a confounding factor), and I focus on interpreting the linear component.
My model is a spatio-temporal model (number of areas = 5526 and number of years = 7).
data$FDep_s <- scale(data$FDep)
data$FDep_s_bis <- data$FDep_s
data$FDep_rw <- inla.group(data$FDep_s, n = 50, method = "quantile")
m <- length(unique(data$FDep_rw))
Aext <- list(A = matrix(scale(1:m), 1, m), e = 0)
formula <- O ~
f(ID, model = "bym2", graph = Geom_France.adj, hyper = hyper_bym, constr = T, scale.model = T) +
f(ANNEE, model = "rw2", hyper = hyper_iid_rw, constr = T, scale.model = T) +
f(ANNEE_1_b, model = "iid", hyper = hyper_iid_rw, constr = T) +
f(SPID.ANNEE, model = "iid", hyper = hyper_iid_rw, constr = T) +
FDep_s + # the linear part with the original continuous variable
f(FDep_rw, model = "rw2", scale.model = TRUE, constr = TRUE, extraconstr = Aext, hyper = hyper_iid_rw) # the nonlinear part with a discretization of the original variable
Is this reformulation correct for my case? Could you possibly provide some references to better understand this way of approaching splines?
Thank you for your help.