0

In my data frame I have my observations in blocks of time so in order to take the effect of year I decided to works with mixed effect model by specifying the year of sampling as random effect. This is a simple example of how I proceeded :

modele <- glmer(P_A ~ Tmax + (1 | year) , 
                data = Data_Species_std_, family=binomial(link="logit"),
                control=glmerControl(optimizer="bobyqa",
                                     optCtrl=list(maxfun=1500000)))

where P_A is presence-absence observations. From this model, I want to test the spatial autocorrelation of the residuals but I don't know if it is correct to extract the residual of this model resid(modele) and perform the Moran's I test on it, since there is a temporal lag between my observations and so between my residuals. Otherwise, what is the best way to do such a test?

user1988
  • 29
  • 1
  • 7
  • voting to close/move to [CrossValidated](https://stats.stackexchange.com). **tl;dr** it would be reasonable to test the residuals of this model for spatial autocorrelation, but it would be worth thinking about what *kind* of spatial autocorrelation you are looking for (i.e. are spatial deviations constant across time or do they vary among temporal blocks?) – Ben Bolker Jan 23 '21 at 20:04
  • @BenBolker thank you very much for your comment, actually, I think that it is more significant for me to do the test by temporal blocks (doing the test between the locations that are sampled the same year). But what kind of tools permit me to do such a test? – user1988 Jan 23 '21 at 20:20

0 Answers0