dimanche 4 janvier 2015

Spatial regression lag on dependent and independent variables in R


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:


formula


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