SpatialBoundaryCorrection
✖
SpatialBoundaryCorrection
is an option to various spatial statistics functions that control how to correct for boundary effects of observation regions.
Details

- SpatialBoundaryCorrection is also known as edge correction or border correction.
- Boundary correction attempts to correct the bias introduced when spatial statistics is computed over a bounded region near the boundary.
- A typical statistic will count the number points within distance r of a location. If that location is closer to the boundary than r, the resulting count will be too low and hence introduce a bias.
- Possible general settings include:
-
Automatic automatically determined boundary correction None no boundary correction "BorderMargin" creates an interior boundary margin - The "BorderMargin" for a given radius
will drop points closer to the boundary than
.
-
- Possible special setting include:
-
"Ripley" uses weights depending on the point distance to boundary "Hanisch" drops points for which the distance to the nearest neighbor is greater than the distance to boundary "KaplanMeier" SurvivalDistribution method: the point distance to its nearest neighbor is censored by its distance to the region boundary "NelsonAalen" SurvivalDistribution method: the point distance to its nearest neighbor is censored by its distance to the region boundary - Different functions may document additional settings available for that particular function.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Applications (2)Sample problems that can be solved with this function
With no boundary correction, the estimator of RipleyK is biased and should not be used unless with a large point set:

https://wolfram.com/xid/01k6gi6rc33zo1xgi-ch7be2

https://wolfram.com/xid/01k6gi6rc33zo1xgi-ds1aaa

https://wolfram.com/xid/01k6gi6rc33zo1xgi-88aqlu

The default method "BorderMargin" only considers the points that are distance from the boundary:

https://wolfram.com/xid/01k6gi6rc33zo1xgi-g1v0t0


https://wolfram.com/xid/01k6gi6rc33zo1xgi-eholvz

Boundary correction method "Ripley" weights each pair of points to make the estimator unbiased:

https://wolfram.com/xid/01k6gi6rc33zo1xgi-dlt8hb

Empirical RipleyK with border correction may not be increasing (especially for smaller sets):

https://wolfram.com/xid/01k6gi6rc33zo1xgi-murbz9

https://wolfram.com/xid/01k6gi6rc33zo1xgi-iu66tv

The uncorrected RipleyK is increasing:

https://wolfram.com/xid/01k6gi6rc33zo1xgi-oy3eb9

Wolfram Research (2020), SpatialBoundaryCorrection, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html.
Text
Wolfram Research (2020), SpatialBoundaryCorrection, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html.
Wolfram Research (2020), SpatialBoundaryCorrection, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html.
CMS
Wolfram Language. 2020. "SpatialBoundaryCorrection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html.
Wolfram Language. 2020. "SpatialBoundaryCorrection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html.
APA
Wolfram Language. (2020). SpatialBoundaryCorrection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html
Wolfram Language. (2020). SpatialBoundaryCorrection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html
BibTeX
@misc{reference.wolfram_2025_spatialboundarycorrection, author="Wolfram Research", title="{SpatialBoundaryCorrection}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_spatialboundarycorrection, organization={Wolfram Research}, title={SpatialBoundaryCorrection}, year={2020}, url={https://reference.wolfram.com/language/ref/SpatialBoundaryCorrection.html}, note=[Accessed: 19-June-2025
]}