I have a SpatialPolygonsDataFrame
with summarize data about some regions.
How can I make a spatial regression with lag both in the independents and dependent variables in R, like this:
I also would like to define the neighbourhood as the polygons which distance of the centroids is smaller than a threshold instead of shared boundaries or k near neighbour, since my polygons have different sizes, and define the weights as the inverse distances of centroids.
I look the documentation of lagsarlm()
of spdep
library but I couldn't figure out how to add the lag variable and how to make the listW
as I want.
Aucun commentaire:
Enregistrer un commentaire