Replies: 2 comments 1 reply
-
Good question. Yes -- this should work, though you'll want to turn SPDE spatial effects off and use the t2() smoother instead of te(). Here's an example that works:
|
Beta Was this translation helpful? Give feedback.
-
I think of the SPDE as implementing one version of spatial smoothing, and so turning it off is important when the tensor smooth is trying to approximate something very similar. I should have also clarified that by turning the SPDE spatial part off, the remaining model is something you could also fit in mgcv::gam() . There's a couple nuanced features of sdmTMB that obviously aren't in mgcv (e.g. AR(1) processes on parameters) -- but should be equivalent |
Beta Was this translation helpful? Give feedback.
-
Hi
I was wondering if it is possible to use a spatio-temporal smoother in a sdmTMB model. The smoother should represents a function of a given density in space (coordinates) as a thin plate regression spline and time (month) as a cyclic cubic regression spline. Using the sintax of mgcv R package, it should be a tensor product smooth of the formula
te(x,y,month, d =c(2,1)) + bs=c("tp,""cc"))
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions