Skip to content
Prev 24902 / 29559 Next

spdep lagsarlm regression error

Do you have NA values in your dataframe 'mex'? The problem may be that
using the option 'na.action=na.omit', lagsarlm() subsets the listw
object, then the impact() function is waiting for the listw object of
the subset. So, you may want to try to subset your W object, just before
calling impact().
Also I recommend that you check that your data are in the same order
that your listw object: