Generating numeric identifiers for neighbours
numids locivar locjvar , generate(numid1var numid2var)
Description
nunids converts spatial neighbourhood information of the form
locivar locjvar ------- ------- 123 456 678 901
or of the form
"TX" "OK" "TX" "NM"
that is, using any numeric or string identifiers, into identifiers that are observation numbers 1, ..., _N. The order will be the sort order of locivar.
Remarks
numids is a utility for users of spautoc.
It is assumed that every pair of neighbours is recorded twice, once as i and j, once as j and i. If not, use dupneigh first.
Options
generate(numid1var numid2var) specifies two new variables to contain numeric identifiers. It is a required option.
Examples
. numids i j , gen(ni nj)
Author
Nicholas J. Cox, Durham University, U.K. n.j.cox@durham.ac.uk
Also see
On-line: help for spautoc, dupneigh, neigh