Chapter 6 Point Pattern Analysis Using R

6.1 Introduction

6.2 What is special about spatial?

6.2.1 Point Patterns

6.3 Techniques for Point Patterns Using R

6.3.1 Kernel Density Estimates

6.3.2 Kernel Density Estimation Using R


  |                                                        
  |                                                  |   0%
  |                                                        
  |=====                                             |  10%
  |                                                        
  |===============                                   |  30%
  |                                                        
  |=========================                         |  50%
  |                                                        
  |===================================               |  70%
  |                                                        
  |=============================================     |  90%
  |                                                        
  |==================================================| 100%

6.3.3 Further Uses of Kernel Density Estimation


  |                                                        
  |                                                  |   0%
  |                                                        
  |=====                                             |  10%
  |                                                        
  |===============                                   |  30%
  |                                                        
  |=========================                         |  50%
  |                                                        
  |===================================               |  70%
  |                                                        
  |=============================================     |  90%
  |                                                        
  |==================================================| 100%

  |                                                        
  |                                                  |   0%
  |                                                        
  |=====                                             |  10%
  |                                                        
  |===============                                   |  30%
  |                                                        
  |=========================                         |  50%
  |                                                        
  |===================================               |  70%
  |                                                        
  |=============================================     |  90%
  |                                                        
  |==================================================| 100%
KDE Maps to Compare Forced and Non-Forced Burglary Patterns

Figure 6.1: KDE Maps to Compare Forced and Non-Forced Burglary Patterns

6.3.4 Hexagonal Binning Using R

Hexagonal Binning of residential burglaries

Figure 6.2: Hexagonal Binning of residential burglaries

6.3.5 Second Order Analysis of Point Patterns

6.4 Using The \(K\)-function in R

Bramble cane locations

Figure 6.3: Bramble cane locations

Ripley's $k$ function plot

Figure 6.4: Ripley’s \(k\) function plot

$k$ function with envelope

Figure 6.5: \(k\) function with envelope


    Maximum absolute deviation test of CSR
    Monte Carlo test based on 99 simulations
    Summary function: K(r)
    Reference function: theoretical
    Alternative: two.sided
    Interval of distance values: [0, 0.25] units (one
    unit = 9 metres)
    Test statistic: Maximum absolute deviation
    Deviation = observed minus theoretical

data:  bramblecanes
mad = 0.016159, rank = 1, p-value = 0.01

    Diggle-Cressie-Loosmore-Ford test of CSR
    Monte Carlo test based on 99 simulations
    Summary function: K(r)
    Reference function: theoretical
    Alternative: two.sided
    Interval of distance values: [0, 0.25] units (one
    unit = 9 metres)
    Test statistic: Integral of squared absolute
    deviation
    Deviation = observed minus theoretical

data:  bramblecanes
u = 3.3372e-05, rank = 1, p-value = 0.01

6.4.1 The \(L\)-function

$L$ function with envelope

Figure 6.6: \(L\) function with envelope


    Maximum absolute deviation test of CSR
    Monte Carlo test based on 99 simulations
    Summary function: L(r)
    Reference function: theoretical
    Alternative: two.sided
    Interval of distance values: [0, 0.25] units (one
    unit = 9 metres)
    Test statistic: Maximum absolute deviation
    Deviation = observed minus theoretical

data:  bramblecanes
mad = 0.017759, rank = 1, p-value = 0.01

6.6 Looking at Marked Point Patterns

6.7 Cross-\(L\)-function analysis in R

  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [28] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [55] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [82] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[109] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[136] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[163] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[190] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[217] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[244] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[271] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[298] 0 0 0 0 0 0 0 0 0 0 0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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[811] 2 2 2 2 2 2 2 2 2 2 2 2 2
Levels: 0 1 2
Cross-$L$ function for levels 0 and 1 of the bramble cane data

Figure 6.8: Cross-\(L\) function for levels 0 and 1 of the bramble cane data

Cross-$L$ function envelope for levels 0 and 1 of the bramble cane data

Figure 6.9: Cross-\(L\) function envelope for levels 0 and 1 of the bramble cane data


    Diggle-Cressie-Loosmore-Ford test of CSR
    Monte Carlo test based on 99 simulations
    Summary function: L["0", "1"](r)
    Reference function: theoretical
    Alternative: two.sided
    Interval of distance values: [0, 0.25] units (one
    unit = 9 metres)
    Test statistic: Integral of squared absolute
    deviation
    Deviation = observed minus theoretical

data:  bramblecanes
u = 4.3982e-05, rank = 1, p-value = 0.01

6.8 Interpolation of Point Patterns With Continuous Attributes

6.8.3 Inverse Distance Weighting (IDW)

6.8.4 Computing IDW with the gstat Package

Inverse Distance Weighting Estimate of Fulmar Density (Comparison)

Figure 6.11: Inverse Distance Weighting Estimate of Fulmar Density (Comparison)

Next, the same is done for idw.est2

3D Plots of IDW (LHS:$\alpha=1$; RHS:$\alpha=2$)

Figure 6.12: 3D Plots of IDW (LHS:\(\alpha=1\); RHS:\(\alpha=2\))

6.9 The Kriging approach

6.9.1 A Brief Introduction to Kriging

6.9.2 Random Functions