Spatial point processes
Many of the ecological and environmental processes of interest can be represented by a spatial point process or can be viewed as an aggregation of one.
Point patterns:
Geostatistical data:
models of spatial patterns: modelling locations and properties (“marks”) of objects, events, individuals in space and time
aim: understanding mechanisms that generated the pattern
Consider a fixed geographical region \(A\).
The set of locations at which events occur are denoted by \(\mathbf{s} = (\mathbf{s}_1, \ldots, \mathbf{s}_n)\).
We let \(N(A)\) be a random variable which represents the total number of events in every subset of region \(A\).
Our primary interest is in measuring where events occur, so the locations are our data.
Let \(\lambda\) the intensity or point density, i.e, the mean number of points per unit area
In some cases, the intensity will be constant over space (homogeneous), while in other cases it can vary by location (inhomogeneous).
If our intensity is homogeneous, we can define it as
\[ \lambda(s) = \frac{\mathbb{E}[N(A)]}{|A|} = \frac{\lambda |A|}{|A|} = \lambda. \]
We can use the concept of intensity to help us define complete spatial randomness (CSR).
Uniformity and Independent scattering : Given the number of events \(N(A) = n\) in a region, the \(n\) events are independently and have an equal probability of occurring anywhere in the study area.
Poisson distribution of point counts: The number of points in any set \(A_i\) follows a Poisson distribution with mean \(\lambda|A_i|\), that is \[N(A_i) \sim \text{Poisson}(\lambda \,|A_i|).\]
A simplest point process model is the homogeneous Poisson process (HPP).
The likelihood of a point pattern \(\mathbf{y} = \left[ \mathbf{s}_1, \ldots, \mathbf{s}_n \right]^\intercal\) distributed as a HPP with intensity \(\lambda\) and observation window \(\Omega\) is
\[ p(\mathbf{y} | \lambda) \propto \lambda^n e^{ \left( - |\Omega| \lambda \right)} , \]
\(|\Omega|\) is the size of the observation window.
\(\lambda\) is the expected number of points per unit area.
\(|\Omega|\lambda\) the total expected number of points in the observation window.
Let \(\mathbf{y} = s_1,\ldots,s_n\) the \(n\) number of observed events/points in an observation window \(\Omega\)
For an IPP with an intensity \(\lambda(s)\), the likelihood is given by:
\[ p(\mathbf{y} | \lambda) \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i). \]
If the case of an HPP the integral in the likelihood can easily be computed as \(\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} =|\Omega|\lambda\)
For an HPP with an intensity \(\lambda\), the log-likelihood is given by: \[ l(\beta;\mathbf{y}) = n\log(\lambda) -\lambda|\Omega|, \]
The maximum likelihood estimators is \(\hat{\lambda} = n/|\Omega|\).
For IPP, the integral in the likelihood has to be approximateda as a weighted sum.
This integral is approximated as \(\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \approx \sum_{j=1}^J w_j \lambda(\mathbf{s}_j)\)
\(w_j\) are the integration weights
\(\mathbf{s}_j\) are the quadrature locations.
This serves two purposes:
Approximating the integral
re-writing the inhomogeneous Poisson process likelihood as a regular Poisson likelihood.
The idea behind the trick to rewrite the approximate likelihood is to introduce a dummy vector \(\mathbf{z}\) and an integration weights vector \(\mathbf{w}\) of length \(J + n\)
\[\mathbf{z} = \left[\underbrace{0_1, \ldots,0_J}_\text{quadrature locations}, \underbrace{1_1, \ldots ,1_n}_{\text{data points}} \right]^\intercal\]
\[\mathbf{w} = \left[ \underbrace{w_1, \ldots, w_J}_\text{quadrature locations}, \underbrace{0_1, \ldots, 0_n}_\text{data points} \right]^\intercal\]
Then the approximate likelihood can be written as
\[ \begin{aligned} p(\mathbf{z} | \lambda) &\propto \prod_{i=1}^{J + n} \eta_i^{z_i} \exp\left(-w_i \eta_i \right) \\ \eta_i &= \log\lambda(\mathbf{s}_i) = \mathbf{x}(s)'\beta \end{aligned} \]
\[ \log~\lambda(s)= \mathbf{x}(s)'\beta + \xi(s) \]
How do we model \(\xi(s)\) ?
inlabru has implemented some integration schemes that are especially well suited to integrating the intensity in models with an SPDE effect.inlabru uses the same points to define the SPDE approximation and to approximate the integral in the likelihood, but this can be changed.In this example we model the location of forest fires in the Castilla-La Mancha region of Spain between 1998 and 2007.
We are now going to use the elevation as a covariate to explain the variability of the intensity \(\lambda(s)\) over the domain of interest and a spatially structured SPDE model.
\[ \log\lambda(s) = \beta_0 + \beta_1 \text{elevation}(s) + \xi(s) \]
Simple feature collection with 148 features and 4 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: 34.96293 ymin: 34.87499 xmax: 378.819 ymax: 357.528
CRS: NA
First 6 features:
cause burnt.area date julian.date geometry
1 lightning 0.01 2004-01-08 2198 POINT (165.5546 74.87501)
2 lightning 0.04 2004-01-08 2198 POINT (215.7145 254.875)
3 lightning 0.80 2004-01-08 2198 POINT (263.326 284.166)
4 lightning 0.00 2004-01-08 2198 POINT (265.2747 284.875)
5 lightning 0.25 2004-01-08 2198 POINT (236.799 270.223)
6 lightning 0.01 2004-01-09 2199 POINT (297.892 211.545)
The IPP Model \[ \begin{aligned} p(\mathbf{y} | \lambda) & \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i) \\ \eta(s) & = \log ~\lambda(s) = \beta_0 + \beta_1 \,x(s) \end{aligned} \] The code
The LGCP Model
\[ \begin{aligned} p(\mathbf{y} | \lambda) & \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i) \\ \eta(s) & = \log(\lambda(s)) = \color{#FF6B6B}{\boxed{\beta_0}} + \color{#FF6B6B}{\boxed{\beta_1 x(s)}} + \color{#FF6B6B}{\boxed{ \omega(s)}}\\ \end{aligned} \]
The code
# define model component
cmp = ~ Intercept(1) + elev(elev_raster, model = "linear") +
space(geometry, model = spde_model)
# define model predictor
eta = geometry ~ Intercept + elev + space
# build the observation model
lik = bru_obs("cp",
formula = eta,
data = pp,
ips = ips)
# fit the model
fit = bru(cmp, lik)The LGCP Model
\[ \begin{aligned} p(\mathbf{y} | \lambda) & \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i) \\ \color{#FF6B6B}{\boxed{\eta(s)}} & = \log(\lambda(s)) = \color{#FF6B6B}{\boxed{\beta_0 + \beta_1 x(s) + \omega(s)}}\\ \end{aligned} \]
The code
# define model component
cmp = ~ Intercept(1) + elev(elev_raster, model = "linear") +
space(geometry, model = spde_model)
# define model predictor
eta = geometry ~ Intercept + elev + space
# build the observation model
lik = bru_obs("cp",
formula = eta,
data = pp,
ips = ips)
# fit the model
fit = bru(cmp, lik)The LGCP Model
\[ \begin{aligned} \color{#FF6B6B}{\boxed{p(\mathbf{y} | \lambda)}} & \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i) \\ \eta(s) & = \log(\lambda(s)) = \beta_0 + \beta_1x(s) + \omega(s)\\ \end{aligned} \]
The code
# define model component
cmp = ~ Intercept(1) + elev(elev_raster, model = "linear") +
space(geometry, model = spde_model)
# define model predictor
eta = geometry ~ Intercept + elev + space
# build the observation model
lik = bru_obs("cp",
formula = eta,
data = pp,
ips = ips)
# fit the model
fit = bru(cmp, lik)The LGCP Model
\[ \begin{aligned} p(\mathbf{y} | \lambda) & \propto \exp \left( -\int_\Omega \lambda(\mathbf{s}) \mathrm{d}\mathbf{s} \right) \prod_{i=1}^n \lambda(\mathbf{s}_i) \\ \eta(s) & = \log(\lambda(s)) = \beta_0 + \beta_1 x(s) + \omega(s)\\ \end{aligned} \]
The code
# define model component
cmp = ~ Intercept(1) + elev(elev_raster, model = "linear") +
space(geometry, model = spde_model)
# define model predictor
eta = geometry ~ Intercept + elev + space
# build the observation model
lik = bru_obs("cp",
formula = eta,
data = pp,
ips = ips)
# fit the model
fit = bru(cmp, lik)Model Predictions
We can use the predict() method to visualize the posterior mean intensity, log-intensity, std dev, and the SPDE.
Note
Note that the mean field is, by definition, smoother than any realization of the field. Instead we can draw simulations of the field from the posterior distribution using the generate() function.
We can estimate the total number of events over the whole region as follows:
\[ \mathbb{E}(N_\Omega) = \int_\Omega \exp(\lambda(s)) ds \]
To do so, we simulate possible realizations of \(N_\omega\) to include also the likelihood variability in our estimate using the generate() method
Point processes are a stochastic processes that describe the locations where events occur
Unlike geostatistical data where the locations are fixed, here the locations have a stochastic nature; the locations are our data!
IPPs allow the intensity of the point process to vary across space through spatially varying covariates.
Numerical integration schemes are required to estimate the parameters of an IPP
LGCP are a doubly stochastic process that extends IPP models by allowing the intensity function to vary spatially according to a structured spatial random effect
Rivera et al. (2025) Laxton et al. (2023) Palmı́-Perales et al. (2025) Simpson et al. (2016)