In the context of spatial random effects modeled via a discretized Gaussian Markov Random Field (GMRF), the spatial field \(w(s)\) is constructed as:
\[ w(s) = \sum_{g=1}^{G} \xi_g(s) \, \tilde{w}_g \]
where: - \(G\) = total number of vertices in the triangulation - \(\{\xi_g(s)\}\) = basis functions - \(\{\tilde{w}_g\}\) = zero-mean Gaussian random variables forming a GMRF
The basis functions are chosen to be piecewise linear on each triangle. This document explains what this means and why indicator functions cannot be used instead.
For a fixed basis function \(\xi_g(s)\) associated with a specific vertex \(g\):
If you plot \(\xi_g(s)\) over the 2D domain, it looks like a tent or pyramid: - Peak of height 1 at its own vertex \(g\) - Zero at all neighboring vertices - Forms flat, sloping planes across each triangle that contains \(g\)
Consider a triangle with vertices \(A, B, C\):
| Basis Function | Value at A | Value at B | Value at C |
|---|---|---|---|
| \(\xi_A(s)\) | 1 | 0 | 0 |
| \(\xi_B(s)\) | 0 | 1 | 0 |
| \(\xi_C(s)\) | 0 | 0 | 1 |
At the midpoint of edge \(BC\), \(\xi_A = 0\).
An indicator function for vertex \(g\) would be:
\[ \xi_g(s) = \begin{cases} 1 & \text{if } s \text{ is exactly at vertex } g \\ 0 & \text{otherwise} \end{cases} \]
This is essentially a “spike” of zero width, with no support on edges or triangle interiors.
| Property | Piecewise Linear (Tent) | Indicator (Spike) |
|---|---|---|
| Continuity of \(w(s)\) | Continuous everywhere | Discontinuous; zero almost everywhere |
| Interpolation between vertices | Weighted average of three corner values | No interpolation; \(w(s)=0\) between vertices |
| Gradients / derivatives | Well-defined (piecewise constant) | Not defined (Dirac delta) |
| Spatial correlation | Controlled by GMRF precision matrix | Pure white noise at vertices, zero elsewhere |
If indicator functions were used:
\[ w(s) = \sum_{g=1}^{G} \xi_g(s) \tilde{w}_g \]
The field would be zero everywhere except at discrete vertex points — completely useless for representing a continuous spatial random field.
The piecewise linear basis functions are the simplest choice that provides:
Think of approximating a smooth curve \(f(x)\) on a line divided into intervals:
Indicator functions cannot be used because \(w(s)\) would be zero almost everywhere, undefined on triangle interiors, and unable to represent the spatial continuity, smoothness, or gradients required by the GMRF and the underlying SPDE.
The piecewise linear basis function is the minimal choice that yields a continuous, differentiable (piecewise), interpolating spatial field with local dependence structure suitable for GMRF modeling.