The MultiDistance Spatial Cluster Analysis (Ripley's Kfunction) tool determines whether a feature class is clustered at multiple different distances. The tool outputs the result as a table and optionally as a pop up graphic.
Learn more about how MultiDistance Spatial Cluster Analysis works.
Illustration
MultiDistanceSpatialClustering_stats (Input_Feature_Class, Output_Table, Number_of_Distance_Bands, Compute_Confidence_Envelope, Display_Results_Graphically, Weight_Field, Beginning_Distance, Distance_Increment, Boundary_Correction_Method, Study_Area_Method, Study_Area_Feature_Class)
Parameter 
Explanation 
Datatype 
Input Feature Class (Required) 
The feature class upon which the analysis will be performed.

Feature Class 
Output Table (Required) 
The table to which the results of the analysis will be written.

Table 
Number of Distance Bands (Required) 
The number of times to increment the neighborhood size and analyze the dataset for clustering. The starting point and size of the increment are specified in the Beginning Distance and Distance Increment parameters respectively.

Long 
Compute Confidence Envelope (Optional) 
The confidence envelope is calculated by randomly placing points in the study area. The number of points randomly placed is equal to the number of points in the feature class. Each set of random placements is called a "permutation" and the confidence envelope is created from these permutations. This parameter allows you to select how many permutations you want to use to create the confidence envelope.
 0 Permutations: no confidence envelope—Confidence envelopes are not created.
 9 Permutations—the tool randomly places nine sets of points.
 99 Permutations—the tool randomly places 99 sets of points.
 999 Permutations—the tool randomly places 999 sets of points.

String 
Display Results Graphically (Optional) 
Specifies whether the tool will display the results of the MultiDistance Spatial Cluster Analysis tool graphically.
 True—The output will be displayed graphically.
 False—The output will not be displayed graphically.

Boolean 
Weight Field (Optional) 
A numeric field with weights representing the number of features/events at each location.

Field 
Beginning Distance (Optional) 
The distance at which to start the cluster analysis and the distance from which to increment. The value entered for this parameter should be in the units of the Output Coordinate System.

Double 
Distance Increment (Optional) 
The distance to increment during each iteration. The distance used in the analysis starts at the Beginning Distance and increments by the amount specified in the Distance Increment. The value entered for this parameter should be in the units of the output coordinate system.

Long 
Boundary Correction Method (Optional) 
Method to use to correct for under estimates in the number of neighbors for features near the edges of the study area.
 None—No edge correction is applied. However, if the input feature class already has points that fall outside the study area boundaries, these will be used in neighborhood counts for features near boundaries.
 Simulate Outer Boundary Values—This method simulates points outside the study area so that the number of neighbors near the edges is not under estimated. The simulated points are the "mirrors" of points within the study area across the study area boundary.
 Reduce Analysis Area—This method shrinks the study area such that some points are found outside of the study area. Points found outside the study area are used to calculate neighbor counts but not used in the cluster analysis itself.
 Ripley's Edge Correction Formula—For all the points (j) in the neighborhood of point i, this method checks to see if the edge of the study area is closer to i or if j is closer to i. If j is closer, extra weight is given to the point j. This edge correction method is only appropriate for square or rectangular shaped study areas.

String 
Study Area Method (Optional) 
Specifies the region to use for the study area. The K Function is sensitive to changes in study area size so careful selection of this value is important.
 Minimum Enclosing Rectangle—Indicates that the smallest possible rectangle enclosing all of the points will be used.
 User provided Study Area Feature Class—Indicates that a feature class defining the study area will be provided in the Study Area Feature Class parameter.

String 
Study Area Feature Class (Optional) 
Feature class that delineates the area over which the input feature class should be analyzed. Only to be specified if Userprovided Study Area Feature Class is selected for the Study Area Feature Class parameter.

Feature Class 
Data types for geoprocessing tool parametersScript Example# Use Ripley's KFunction to analyze the spatial distribution of 911
# calls in Portland Oregon
# Import system modules
import arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create(9.3)
gp.OverwriteOutput = 1
# Local variables...
workspace = "C:\Data\Portland911\Projected"
try:
# Set the current workspace (to avoid having to specify the full path to the feature classes each time)
gp.workspace = workspace
# Set Distance Band Parameters: Analyze clustering of 911 calls from
# 1000 to 3000 feet by 200 foot increments
numDistances = 11
startDistance = 1000.0
increment = 200.0
# Process: Run KFunction...
kFun = gp.MultiDistanceSpatialClustering("911Calls.shp",
"kFunResult.dbf", numDistances,
"0 Permutations  no confidence envelope",
"false", "#", startDistance, increment,
"Reduce Analysis Area",
"Minimum Enclosing Rectangle", "#")
except:
# If an error occurred when running the tool, print out the error message.
print gp.GetMessages()