Hi Laura,
Adding to what Eric said, I'm not sure you've given us all the information required to provide the answers you are looking for.
It was unclear to me whether you were referring to the covariates strata end year as having an impact on detectability (ie at the detectionfunctionlevel), having an impact on density (ie at the density surface model) or potentially having an impact on both.
It was also unclear to me whether there might be additional covariates, both for the detection function component as well as for the density surface model component.
I am going to pretend that you have a set of covariates A that will influence the dectability, and you have a set of covariates B that will influence density. Let's ignore for now if there are covariates that belong to both sets A and B, which there wouldn't
be a problem in principle if there were.
That kind of goes without saying but, what I would do first would be to fit the best possible model, using the covariates in A, to the detection function component. If
year and/or strata are expected to influence detectability, say, because in different years, you used different observers, or in different strata there's different habitats, then include those in the detection function model.
Then I would fit a density surface model that would have year and strata (and anything else avalable that might help predicting animal density) as covariates in the dsm. You could potentially include an interaction term between between year and strata. Perhaps
even more interesting you would have an interaction term between any other existing covariates and year so, let's pretend you had say altitude, if you fit a model with an interaction between year and altitude, that would allow you to say whether the influence
of altitude on density has changed across years. If that model has no support from the data, say, using some information criteria like AIC, then that means as Eric suggested that the influence of altitude on density has not changed across the two years of
surveys.
Using that same model, you could now have two different prediction grids, one with covariate data from the first year (were naturally year value was fixed at 2018) one with data from the second year (year fixed at 2024) and make predictions per year, and or
per region per year, from the same DSM.
Regarding your desire "to
understand which environmental variables best explain their distribution." of course, that is tempting, and we all tend to do it but...I would suggest that you are very careful with the choice of words when discussing the outputs of your model. A dsm is correlative
in nature, so it does not allow for causal inferences. That means that, based on the available data, you do identify the best set of covariates that can be used to predict density, but those might not be the variables that density depends on. Those variables
that did end up in your best model might just be usefully available proxies for the variables that truly determine the animal density. So while it might make sense to try to interpret the smooth functions from the dsm from an ecological point of view, one
should always bear in mind that the patterns you are seeing might be driven by other sets of variables that are correlated with the ones you have in your model, but which you had not the luxury to observe.
Anyway, I hope this helps you,
T