I want to create a spatially lagged version of my response variable to estimate a spatial autoregressive model in R. To quantify the spatial relationship that exists among the features in my data I have used Generate Network Spatial Weights-tool in ArcMap. Basically, this tool defines the feature spatial relationships based on an underlying network structure (a street network in my case). The problem is that output from the Generate Network Spatial Weights-tool is a Spatial Weight Matrix file (.swm), which I don't know how to use in R. I, therefore, wonder if someone knows:
Is there any package in R that support .swm files or is there a way to convert the .swm file into a format that is easier to handle in R, such as .gal or .gwt format?
Is there any package or function in R that allows me to define the feature spatial relationships based on an underlying network structure similar to the Generate Network Spatial Weights-tool in ArcMap?
Any help is appreciated.