Hi,
I am trying to create a firm-to-firm inverse distance matrix and there are several firms at the same geographical coordinates--this is a historical dataset (mostly 19th C) and the coordinates are at the city or county level.
Years ago, I _successfully_ used this code to generate it:
spmat idistance invdistmatrix_sp x_long2 y_lat2, id(id) dfunction(dhaversine, miles)
Having to use this code to create some new measures, I run into this error: "Two or more observations have the same coordinates"
Please help! Have tried a few workarounds but nothing has worked so far. I would prefer not to use another software package if I can help it since I want the measures to be consistent across my studies, but if there's no choice, would appreciate any suggestions.
Thank you in advance!
Best wishes,
Chirag
I am trying to create a firm-to-firm inverse distance matrix and there are several firms at the same geographical coordinates--this is a historical dataset (mostly 19th C) and the coordinates are at the city or county level.
Years ago, I _successfully_ used this code to generate it:
spmat idistance invdistmatrix_sp x_long2 y_lat2, id(id) dfunction(dhaversine, miles)
Having to use this code to create some new measures, I run into this error: "Two or more observations have the same coordinates"
Please help! Have tried a few workarounds but nothing has worked so far. I would prefer not to use another software package if I can help it since I want the measures to be consistent across my studies, but if there's no choice, would appreciate any suggestions.
Thank you in advance!
Best wishes,
Chirag
Comment