Closed ChloeRN closed 11 months ago
Spatial conditional autoregressive (CAR) models may be the way to go. These have been implemented in NIMBLE in the context of disease modelling and there's an example here: https://r-nimble.org/nimbleExamples/CAR.html
Relevant code appears to be archived in https://github.com/Andrew9Lawson/Bayesian_DM_Nimble_code/tree/ICAR-and-other-code.
Paper to go with this: https://www.sciencedirect.com/science/article/pii/S1877584520300010?via%3Dihub
I am (temporarily) closing this issue as we currently do not have the resources to pursue model extensions with complex (= spatially correlated) random effects. For the time being, we will make to with a simple variance partitioning approach (see #39). But it would be really nice to pick this up again in the future :-)
The plan is to model spatio-temporal variation in vital rates and detection parameters. Per now, reproductive rate (R) and DS detection (sigma) are modelled with independent site-specific intercepts and shared random year effects, i.e.
link(rate[x, t]) ~ link(Mu.rate[x]) + epsT.rate[t]
Eventually, we want to have spatial correlation in the epsT (REs) and potentially also the Mu (averages) for at least sigma and R, potentially also survival (S1 and S2).