Edge effects - the nearest neighbor distance for an event near the boundary R will be biased.  Because the event near the boundary is denied the possibility of neighbors outside the boundary.  Edge points tend to have greater bias than the ones further inside the region.
Two options:
1. Create guard area inside the perimeter of R.  Nearest neighbor distances are not used for events within the guard area, but events in the guard area are allowed as neighbors of any events in the rest of R.
2. Toroidal edge correction where the top of R is joined to the bottom of R, and left side is joined to right.  The study area is considered to be the center of a 3x3 grid which can consider neighbors outside the R boundary.

There is no exact rule for edge corrections.  Usually with rectangles, you can get away without it, but it never hurts to do it either.  If you do a correction using option 1, you have to make sure you have enough points to justify excluding some.
  So if you only have a small point pattern, with few points, edge correction wouldn't be a good idea.

o When comparing Fhat, Ghat or Khat to theoretical F,  G, or K function, you have to apply edge corrections.
o If you compare Fhat, Ghat or Khat  to simulation envelopes you do not need an edge correction.    This is because the effect of not using edge correction cancels out for the observed data and the data obtained by simulation.

Since our data falls into a rectangle, and we don't have that many points, we do not really  need an edge correction.  But, with the Khat we did compare it to the theoretical K and so when we created our theoretical K by toroidal shift, we essentially created an edge correction on our simulation.