Point Patterns I

HES 505 Fall 2025: Session 15

Matt Williamson

Update on Assignments

  • Updated (clarified) process:

    • You submit (commit) your first version
    • I’ll post the key
    • You update your assignment highlighting any areas you still feel unsure about
    • I’ll annotate your repo with feedback

Update on Assignments

  • Key to Assignments 1 and 2 posted by Oct 15.

  • Revisions Due by Nov 1.

  • Key to Assignment 3 posted by Oct 27.

  • Revision due Nov 12

Point Patterns

Objectives

  • Define a point process

  • Define Complete Spatial Randomness

  • Distinguish First and Second-Order CSR

  • Introduce density-based methods for describing point patterns

What is a point pattern?

  • Point pattern: A set of events within a study region (i.e., a window) generated by a random process

  • Set: A collection of mathematical events

  • Events: The existence of a point object of the type we are interested in at a particular location in the study region

  • A marked point pattern refers to a point pattern where the events have additional descriptors

Some notation:

  • \(S\): refers to the entire set

  • \(\mathbf{s_i}\) denotes the vector of data describing point \(s_i\) in set \(S\)

  • \(\#(S \in A )\) refers to the number of points in \(S\) within study area \(A\)

Requirements for a set to be considered a point pattern

  • The pattern must be mapped on a plane to preserve distance

  • The study area, \(A\), should be objectively determined

  • There should be a \(1:1\) correspondence between objects in \(A\) and events in the pattern

  • Events must be proper i.e., refer to actual locations of the event

  • For some analyses the pattern should be a census of the relevant events

Describing Point Patterns

  • First order effects reflect variation in intensity due to variation in the ‘attractiveness’ of locations (density)

  • Second order effects reflect variation in intensity due to the presence of points themselves (distance)

Basic Descriptions: Centrography

Analyzing Point Patterns

3 Flavors of Point Pattern Analysis

  • Modeling random processes means we are interested in probability densities of the points (first-order;density)

  • Also interested in how the presence of some events affects the probability of other events (second-order;distance)

  • Finally interested in how the attributes of an event affect location (marked)

  • Need to introduce a few new packages (spatstat and gstat)

First Order Analsyis: CSR

  • Homogeneous Poisson Process:
    • All events have an equal likelihood of occurring anywhere
    • Point locations are independent (no attraction/repulsion)
    • Given a rate (\(\lambda\)) we can estimate the expected number of points

Density based methods

  • The overall intensity of a point pattern is a crude density estimate
  • Local density = quadrat counts

\[ \begin{equation} \hat{\lambda} = \frac{\#(S \in A )}{a} \end{equation} \]

Quadrat Counts and CSR

  • Observed vs. Expected

  • \(\chi^2\) test

Kernel Density Estimates (KDE)

\[ \begin{equation} \hat{f}(x) = \frac{1}{nh_xh_y} \sum_{i=1}^n k\bigg(\frac{{x-x_i}}{h_x},\frac{{y-y_i}}{h_y} \bigg) \end{equation} \]

  • Assume each location in \(\mathbf{s_i}\) drawn from unknown distribution

  • Distribution has probability density \(f(\mathbf{x})\)

  • Estimate \(f(\mathbf{x})\) by averaging probability “bumps” around each location

  • Need different object types for most operations in R (as.ppp)

Kernel Density Estimates (KDE)

Kernel Density Estimates (KDE)

\[ \begin{equation} \hat{f}(x) = \frac{1}{nh_xh_y} \sum_{i=1}^n k\bigg(\frac{{x-x_i}}{h_x},\frac{{y-y_i}}{h_y} \bigg) \end{equation} \]

  • \(h\) is the bandwidth and \(k\) is the kernel

  • We can use stats::density to explore

  • kernel: defines the shape, size, and weight assigned to observations in the window

  • bandwidth often assigned based on distance from the window center

Bandwidth Matters (more than kernel shape)

  • Look at ?density to see all the kernel options!
x <- rpoispp(lambda =50)
K1 <- density(x, bw=2)
K2 <- density(x, bw=10)
K3 <- density(x, bw=2, kernel="disc")

Choosing bandwidths and kernels

  • Small values for \(h\) give ‘spiky’ densities

  • Large values for \(h\) smooth much more

  • Some kernels have optimal bandwidth detection