 
                
               
 
                To compute the edge correction factors  that appear in the formulas of the distance functions, the SPP procedure implements border edge correction  (Illian et al.,
               2008; Ripley, 1988; Baddeley, 2007). Border edge correction is necessary because the data are given for a bounded observation window
 that appear in the formulas of the distance functions, the SPP procedure implements border edge correction  (Illian et al.,
               2008; Ripley, 1988; Baddeley, 2007). Border edge correction is necessary because the data are given for a bounded observation window  , but the pattern itself is assumed to extend beyond the observation window. However, because you can observe only what is
               within the window, a disc
, but the pattern itself is assumed to extend beyond the observation window. However, because you can observe only what is
               within the window, a disc  of radius r around a point x that lies close to the boundary of
 of radius r around a point x that lies close to the boundary of  might extend outside
 might extend outside  . Because the original process
. Because the original process  is not observed outside
 is not observed outside  , the number of points of
, the number of points of  in
 in  is not observable (Baddeley, 2007). Ignoring the fact that the observable quantity
 is not observable (Baddeley, 2007). Ignoring the fact that the observable quantity  is less than or equal to
 is less than or equal to  leads to a bias that is caused by edge effects. The border edge corrector is a simple strategy to eliminate the bias that
               is caused by edge effects. Under the border method, the window
 leads to a bias that is caused by edge effects. The border edge corrector is a simple strategy to eliminate the bias that
               is caused by edge effects. Under the border method, the window  is replaced by a reduced window,
 is replaced by a reduced window, 
            
![\[  W_{\circleddash r} = W \circleddash b(0,r) = \{ x \in W: ||x - \partial W||\geq r \}  \]](images/statug_spp0110.png)
 where  denotes the minimum distance from X to a point on the boundary. The reduced window contains all the points in
 denotes the minimum distance from X to a point on the boundary. The reduced window contains all the points in  that are at least r units away from the boundary
 that are at least r units away from the boundary  .
. 
            
Based on the preceding definition, the border edge corrected F, K, and G functions are
![\[  \hat{F}(r) = \frac{1}{\lambda |W_{\circleddash r}|}\sum _{g_ j\in W_{\circleddash r}} \Strong{1}\{ d(g_ j,x) \leq r\}   \]](images/statug_spp0112.png)
![\[  \hat{K}(r) = \frac{\sum _{i=1}^{n} \sum _{j\ne i} \Strong{1}\{ ||x_ i - x_ j|| \leq r\} }{\hat{\beta } n(x \cap W_{\circleddash r})}  \]](images/statug_spp0113.png)
![\[  \hat{G}(r) = \frac{\sum _{x_ i \in W_{\circleddash r}} \Strong{1}\{ ||x_ i - X/\  x_ i|| \leq r \} }{n(X\cap W_{\circleddash r})}  \]](images/statug_spp0114.png)
![\[  \hat{G}(r) = \frac{\sum _ i \Strong{1}\{ d_ i \leq r, b_ i \geq r \} }{\sum _ i\Strong{1}\{ b_ i \geq r\} } \]](images/statug_spp0115.png)
where  ;
;  is the observed nearest-neighbor distance,
 is the observed nearest-neighbor distance,  , for the ith point
, for the ith point  ; and
; and  is the distance from
 is the distance from  to the boundary
 to the boundary  . For more information about these border-edge-corrected functions, see  Baddeley (2007).
. For more information about these border-edge-corrected functions, see  Baddeley (2007).