Random effect structure – using sdmTMB for a sparse river network. #379
-
Hi there,
The analysis includes 214 streams, however the data are not spatially explicit, and are only available at the stream level. To create the mesh, I selected one point for each stream 500 river meters from the mouth of the river. I’m looking for guidance on selecting the random effect structure for this model, and understanding why the direction and magnitude of one of my fixed effects (population density) varies with different random effect structures. Initially, I had included a random effect of stream (214 levels), since the response (angler effort) is collected at the yearly level of a given stream. However, I was worried that since the mesh was constructed with those same 214 it would soak up too much of the variability and we would not be able to detect spatial shifts in effort (the spatial SD was 0). When running the model with a ranef of broader management area (5 levels: Van Island, Lower Mainland, Skeena, Cariboo, Thompson-Nicola) both the sanity checks and fit look better. However, the direction and magnitude of the effect of population density (i.e, whether angler effort is higher in more densely populated areas) changes drastically among models with different fixed effect structures. The model with stream as the random effect provides a result that is more aligned with both the hypothesis that there would be higher effort in more populated areas, and also the raw data, however the both the sanity checks and fit are poorer. I’ve attached a document with more details on the data and model outputs. If anyone has insights into why this might be happening —or general advice on choosing the best random effect structure/model configuration in this context—I’d be very grateful! 😊 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
It might be interesting to compare this SPDE spatial model with an alternative using stream network distances ... feel free to look at the |
Beta Was this translation helpful? Give feedback.
This is a good question. You have spatial fields included in all of these models, and those spatial fields (as random effects) are going to try to explain all of the covariates that might be related to the response. Adding on additional random effects that are spatially structured (such as stream or area) is generally not a good idea, because it can change the interpretation / effects of fixed effect variables. I think it's fine to include either, but if you did so I'd turn the spatial field off with
spatial="off"
Looking at these models, you're very close with the 3rd model that has no random effects (your output pasted below). The ar1 phi gradient can be solved either by doing the extra…