Hey,
I have a dataset containing the name of the villages, their coordinates (longitude and latitude) and a dummy variable representing the fact of being assigned to a program (1= treatetment, 0=control). I want to calculate the shortest distance of each "control" village to a "treated" one.
I tried to use the command Geonear in the following way:
geonear Village Latitude Longitude using "file", n(Village Latitude Longitude) ignoreself
But of course it is calculating the shortest distance to ANY villages, not to just the control to a treated one. I wonder if there is an option to integrate the above-written formula, or if there is an other way to get to my goal.
Thank you in advance for your help,
Matteo
I have a dataset containing the name of the villages, their coordinates (longitude and latitude) and a dummy variable representing the fact of being assigned to a program (1= treatetment, 0=control). I want to calculate the shortest distance of each "control" village to a "treated" one.
I tried to use the command Geonear in the following way:
geonear Village Latitude Longitude using "file", n(Village Latitude Longitude) ignoreself
But of course it is calculating the shortest distance to ANY villages, not to just the control to a treated one. I wonder if there is an option to integrate the above-written formula, or if there is an other way to get to my goal.
Thank you in advance for your help,
Matteo
Comment