Hi, I am trying to construct a spatial lag variable of hourly wage of immigrants on the base of the average wage of their neighbours which I have characterised in a binary matrix generated through excel.The matrix enters a value of one if the individual is of an ethnic group which is in a same ethnic neighbour grouping of another ethnic group. I have no information on coordinates and longitudes and latitudes.
I am struggling to find a way to generate a spatial lag of the average wage variable and am not sure if my matrix specification is usable on sp commands. My question is whether there is a way to use sp commands on a weights file that is generated exogenously (on Excel) and if there is a way to generate a spatial lag variable from the use of this exogenous matrix through spmatrix commands.
I have included my weights file (containing the matrix I have constructed through excel), and my data file which I aim to use to conduct a GMM estimation with a spatially lagged variable of the base hourly rate of wages conditioned on the average wage of the ethnic neighbours.
I would immensely appreciate any help or recommendations in conducting this analysis, thank you so much!
http://fmwww.bc.edu/RePEc/bocode/s/splagvar.html (the splagvar code which I want to use but is not compatible with spmatrix commands) I have also created a spatial weighting object but this is not recognized by official sp commands.
I am struggling to find a way to generate a spatial lag of the average wage variable and am not sure if my matrix specification is usable on sp commands. My question is whether there is a way to use sp commands on a weights file that is generated exogenously (on Excel) and if there is a way to generate a spatial lag variable from the use of this exogenous matrix through spmatrix commands.
I have included my weights file (containing the matrix I have constructed through excel), and my data file which I aim to use to conduct a GMM estimation with a spatially lagged variable of the base hourly rate of wages conditioned on the average wage of the ethnic neighbours.
I would immensely appreciate any help or recommendations in conducting this analysis, thank you so much!
http://fmwww.bc.edu/RePEc/bocode/s/splagvar.html (the splagvar code which I want to use but is not compatible with spmatrix commands) I have also created a spatial weighting object but this is not recognized by official sp commands.