HES 505 Fall 2024: Session 18
Chance to revise assignments 6-7 - please note why you made changes/what the new code does
Switching projects in RStudio
By the end of today you should be able to:
Distinguish deterministic and stochastic processes
Define autocorrelation and describe its estimation
Articulate the benefits and drawbacks of autocorrelation
Leverage point patterns and autocorrelation to interpolate missing data
A spatial process is a description of how a spatial pattern might be generated
Generative models
An observed pattern as a possible realization of an hypothesized process
\[ z = 2x + 3y \]
\[ z = 2x + 3y + d \]
Considering each outcome as the realization of a process allows us to generate expected values
The simplest spatial process is Completely Spatial Random (CSR) process
First Order effects: any event has an equal probability of occurring in a location
Second Order effects: the location of one event is independent of the other events
We can use quadrat counts to estimate the expected number of events in a given area
The probability of each possible count is given by:
\[ P(n,k) = {n \choose x}p^k(1-p)^{n-k} \]
\[ \begin{equation} P(k,n,x) = {n \choose k}\bigg(\frac{1}{x}\bigg)^k\bigg(\frac{x-1}{x}\bigg)^{n-k} \end{equation} \]
Probability is tied to quadrat size – we can improve estimates with a moving window
If points have independent, fixed marginal densities, then they exhibit complete, spatial randomness (CSR)
The K function is an alternative, based on a series of circles with increasing radius
\[ \begin{equation} K(d) = \lambda^{-1}E(N_d) \end{equation} \]
\[ \begin{equation} K_{CSR}(d) = \pi d^2 \end{equation} \]
When working with a sample the distribution of \(K\) is unknown
Estimate with
\[ \begin{equation} \hat{K}(d) = \hat{\lambda}^{-1}\sum_{i=1}^n\sum_{j=1}^n\frac{I(d_{ij} <d)}{n(n-1)} \end{equation} \]
where:
\[ \begin{equation} \hat{\lambda} = \frac{n}{|A|} \end{equation} \]
Using the spatstat package
\(L\) function: square root transformation of \(K\)
\(G\) function: the cumulative frequency distribution of the nearest neighbor distances
\(F\) function: similar to \(G\) but based on randomly located points
‘everything is usually related to all else but those which are near to each other are more related when compared to those that are further away’.