These files are used to define neighbor relationships in Anselin's local Moran and Grimson's method. Contiguity files (*.gal) indicate whether areas, locations, or events neighbor each other.
These files indicate whether a region or location has any neighbors, identifying them if so. For Anselin's local Moran, the neighbor relationships indicate spatial adjacency. For Grimson's method, they can indicate spatial, temporal, or spatio-temporal adjacency. You can create these files with SpaceStatTM or use a text editor and save with a *.gal extension.
The *.gal file has the following structure
|
total region count |
|
|
egolabel |
neighbor count |
|
neighbor label |
neighbor label...... |
|
egolabel |
1 |
|
neighbor label |
|
|
egolabel |
0 |
|
egolabel |
neighbor count |
|
etc. |
|
The first row specifies the total region count. ClusterSeer checks for at least one field in that row, and it verifies that the total region count in the first field matches the total number of regions specified in the disease frequency data file.
The second row specifies a target region, called an "ego," by its label and a count of its neighbors.
The third row lists the identities of those neighbors, with the row continuing until all neighbors have been listed. Egos without neighbors can be specified as having a neighbor count of zero or be omitted from the list. ClusterSeer checks rows with neighbor counts for at least 2 fields, checks that the count value is a positive integer, and that the count is less than the total number of areas minus 1 (because a region can't be its own neighbor).
The following row specifies the neighbors of the first ego, and there must be at least as many fields in that row as the neighbor count (excess fields will be ignored). Neighbor labels cannot match the ego's label, and there can be no duplicates. If the neighbor count in the previous row is zero, then the next row lists a new ego and the number of its neighbors.
All region labels (for egos and neighbors) must match those in the disease frequency file.