I'm trying to create the spatial lag of a variable. This variable is the amount of public transfers observed for the 2458 mexican municipalities. Unfortunatly, the data are missing for 234 municipalities.
To do so, I first created the contiguity matrix with the command:
Code:
spmat contiguity matrixNr using mexico_mun_xy, id(id) normalize(row)
I then used
Code:
spmat lag double transfer_lag matrixNr transfer
My question: Is there any way Stata can handle missing values while creating a spatial lag ?
This only solution I found is to create a new 2224x2224 contiguity matrix (deleting the municipalities for which the data where missing) and deleting the 234 missings in my public transfer database. Then I can get the spatial lag. However, it doesn't seem really correct to me to proceed this way and I'm not sure the data generated are valid.
I hope someone can help me.
Thank you !
Lucie
0 Response to Creating the spatial lag (spmat lag) of a variable with missing values
Post a Comment