Hello everybody,
I am currently trying to do a Gaussian linear regression in R with data that may be spatially autocorrelated. My dataset contains geographic coordinates (value of longitude, value of latitude), species, independent variables (BS and LTS) and some explanatory variables. The dataset also include the values of latitude and longitude in separated columns.
I extracted positive eigenvector-based spatial filters from a truncated matrix of geographic distances among sampling sites. I would like to treat spatial filters as candidate explanatory variables in my linear regression model. I did this as following:
First of all, I created a neighbor list object (nb). In my case of irregular samplings, I used the function knearneight of the R package spdep:
knea8