I am running a GetisOrd Gi* hotspot analysis of Tuberculosis in South Africa based on laboratory data of the number of TB cases in each health facility. The TB case data are aggregated at the health facility level as patient address information is not available/reliable. Since the distribution of health clinics is clearly not random, and distance to nearest neighbour(s) varies substantially between rural and urban clinics (closest 1km, furthest 110km), I have chosen to use Delaunay triangulation to develop spatial weights for the GetisOrd Gi* analysis.
The problem: the output of the Delaunay spatial weights (using the generate spatial weights matrix tool) includes weights which extend across Lesotho (another country which is fully enclosed within South Africa's borders) as well as outside of South Africa (see attached diagram of the spatial weights generated). Setting the processing extent to the same as a layer representing South Africa's borders does not solve the issue as this seems to only define the processing extent as the enclosing rectangle of South Africa, and not the polygon shape - and results in the attached file.
1) Is there a mechanism in Argcis to enforce boundaries when generating spatial weights?
2) If not, is it appropiate to simply delete the spatial weights generated which cross country borders, and reweight the weightings based on the remaining number of links?
3) Is their a mechanism to do this in other software such as R / Stata?
I am using Argis Desktop 10.4. Data are projected in a modified Albers Equal Areas. Clinic data are point data.
I would be most grateful for any advice/assistance/comments.