Why Use an Exponential Spatial Covariance?
In a spatial GLMM, nearby locations can share latent influences that are not fully captured by the observed covariates. For example, a latent effect for one location may be more similar to the effect at a nearby location than to the effect far away. A covariance function makes this dependence explicit: it describes how the covariance between two latent effects changes with the distance between their locations.
The exponential covariance is a simple, widely used way to represent that pattern. Its correlation decreases smoothly as distance increases, with one parameter controlling the rate of decrease and another controlling the overall variance. The function is a model for the latent spatial effect; it does not, by itself, specify the response distribution or link function of the GLMM.
This specification assumes second-order stationarity: the mean is constant and covariance depends on the separation between locations rather than their absolute positions. It also assumes isotropy: covariance depends on distance \(h\), not the direction from \(s\) to \(t\). Thus, two pairs of locations at the same distance have the same covariance under this model.
Distances must be measured consistently. If coordinates are in kilometres, then \(h\) is in kilometres and \(\phi\) has units of inverse kilometres. A change from kilometres to metres requires a corresponding change in the numerical value of \(\phi\); otherwise the implied correlation pattern changes. The variance \(\sigma_s^2\) is measured in squared units of the latent effect. A Gaussian distribution for the latent field is often used in a GLMM, but Gaussianity is an additional distributional assumption, not part of the covariance formula itself.
What the Two Parameters Control
At distance zero, \(\rho(0)=1\) and \(C(0)=\sigma_s^2\). Increasing \(\sigma_s^2\) scales all covariances upward but leaves correlations unchanged. Increasing \(\phi\), by contrast, makes correlation decrease more rapidly with distance; it does not change the marginal variance.
The decay parameter has a direct distance interpretation. At distance \(1/\phi\), the correlation has fallen to \(e^{-1}\), approximately 0.3679. At distance \((\log 2)/\phi\), it has fallen to one half. Neither distance is a hard boundary: for any finite \(h\), the exponential correlation remains positive, though it approaches zero as \(h\) grows.
Calculate \(h\) in the coordinate units used by the model.
Substitute \(h\) and \(\phi\) into \(\rho(h)=\exp(-\phi h)\).
Multiply the correlation by \(\sigma_s^2\): \(C(h)=\sigma_s^2\rho(h)\).
The relationship between the parameter and distance can be derived directly. The exponential model says that correlation decays at a rate proportional to its current value. Writing this as a differential equation and using the correlation of a location with itself gives
Separating variables and integrating from 0 to \(h\) gives \(\log\{\rho(h)\}=-\phi h\), so \(\rho(h)=\exp(-\phi h)\). This also shows why \(\phi\) controls the decay rate: the derivative is negative for positive \(\phi\), and its magnitude is larger when \(\phi\) is larger, at the same correlation value.
Calculating Correlations at Different Distances
Worked Example: Covariance and Correlation at Three Distances
Suppose a hypothetical latent spatial effect has variance \(\sigma_s^2=4\) squared latent units, with \(\phi=0.5\) per kilometre. Calculate its correlation and covariance for pairs separated by 1 km, 2 km, and 3 km.
For 1 km, the correlation is $$ \rho(1)=\exp\{-(0.5\text{ km}^{-1})(1\text{ km})\}=e^{-0.5}=0.6065. $$ The covariance is \(4e^{-0.5}=2.426\) squared latent units.
For 2 km, $$ \rho(2)=e^{-1}=0.3679,\qquad C(2)=4e^{-1}=1.472. $$ For 3 km, $$ \rho(3)=e^{-1.5}=0.2231,\qquad C(3)=4e^{-1.5}=0.8925. $$
The correlations and covariances both decrease with distance. The covariance values are four times the corresponding correlations because the variance is 4; changing that variance would rescale the covariances without changing these correlations.
Worked Example: Finding the Decay Parameter From a Correlation
Suppose a hypothetical model assigns correlation 0.25 to latent effects 2 km apart. Find \(\phi\), then calculate the correlation and covariance at 1 km and 4 km if the spatial-effect variance is 1.44 squared latent units.
Start from \(0.25=\exp(-2\phi)\), with distance in kilometres. Taking natural logarithms gives \(\log(0.25)=-2\phi\), and hence $$ \phi=-\frac{\log(0.25)}{2}=0.6931\text{ km}^{-1}. $$
At 1 km, \(\rho(1)=e^{-0.6931}\), approximately 0.5000, and \(C(1)=1.44(0.5000)=0.7200\) squared latent units. At 4 km, \(\rho(4)=e^{-2.7724}\), approximately 0.06250, and \(C(4)=1.44(0.06250)=0.09000\) squared latent units. The values are consistent with the given correlation: moving from 2 km to 4 km squares the correlation, so \(0.25^2=0.06250\).
Worked Example: Irregularly Spaced Locations
Consider three hypothetical locations on a straight transect at 0 km, 1 km, and 3 km. Suppose \(\sigma_s^2=2.25\) squared latent units and \(\phi=0.4\text{ km}^{-1}\). Calculate all pairwise distances, correlations, and covariances.
The locations are not equally spaced: their pairwise distances are 1, 2, and 3 km. For locations at 0 and 1 km, \(\rho=e^{-0.4}=0.6703\) and \(C=2.25e^{-0.4}=1.508\). For 1 and 3 km, \(\rho=e^{-0.8}=0.4493\) and \(C=2.25e^{-0.8}=1.011\). For 0 and 3 km, \(\rho=e^{-1.2}=0.3012\) and \(C=2.25e^{-1.2}=0.6777\).
In the order 0, 1, 3 km, the covariance matrix is therefore $$ \boldsymbol{\Sigma}= \begin{pmatrix} 2.25 & 1.5082 & 0.6777\\ 1.5082 & 2.25 & 1.0110\\ 0.6777 & 1.0110 & 2.25 \end{pmatrix}. $$ The diagonal entries are the common variance, and each off-diagonal entry is determined by the distance for that pair. The exponential covariance is a valid positive-semidefinite covariance function for locations in Euclidean space, so this construction produces a valid covariance matrix (up to rounding in the displayed entries).
Conditions, Diagnostics, and Alternatives
The formula is appropriate only when its structural assumptions are credible. The distance metric should represent meaningful spatial separation, the same coordinate scale must be used throughout, and a single \(\phi\) assumes the same decay pattern across the modeled domain. Stationarity and isotropy may be questionable if the field changes systematically across the region or dependence differs by direction. The exponential kernel itself is positive definite in Euclidean space, which ensures that its covariance matrices are valid for arbitrary finite sets of locations; an arbitrary decreasing function of distance would not necessarily have this property.
In practice, assess whether the fitted spatial structure is plausible alongside the rest of the GLMM. Useful warning signs include residual spatial patterns remaining after fitting, poor fit across distance bands, unstable or boundary estimates of the variance or decay parameter, and marked sensitivity to coordinate units or a small number of locations. A variogram or related residual summaries can reveal distance-dependent lack of fit, though residuals in a non-Gaussian GLMM need to be chosen and interpreted with care. Diagnostics should also consider whether an apparent spatial pattern could reflect omitted covariates or an unsuitable mean structure.
The exponential model is not the only way to represent spatial dependence. Independence sets all covariances between distinct locations to zero and may be too restrictive when nearby latent effects are related. An exchangeable or random-intercept structure gives every pair the same covariance, regardless of distance, and therefore cannot express spatial decay. The exponential model lies between these choices by assigning stronger dependence to closer pairs. Other spatial covariance functions can express different patterns of decay or smoothness; the Gaussian spatial covariance is a distinct alternative.
A central limitation is that the exponential function specifies covariance, not every feature of the latent field or response. In particular, it does not establish that the latent effect is Gaussian, and a latent-effect correlation is not generally equal to the observed response correlation in a nonlinear GLMM. The covariance describes dependence on the latent-effect scale. Also, a stationary isotropic model may be inadequate for irregular boundaries, spatial trends, or direction-specific dependence. These limitations motivate checking the model rather than interpreting a fitted \(\phi\) as a universal property of the data.
Common Mistakes
- Reversing the roles of the parameters. The variance \(\sigma_s^2\) sets the covariance scale; \(\phi\) sets how quickly correlation decays. Increasing \(\phi\) does not increase the variance at a location.
- Forgetting the distance units. The product \(\phi h\) must be dimensionless. If \(h\) is in kilometres, \(\phi\) must be in inverse kilometres.
- Calling \(\exp(-\phi h)\) the covariance. It is the correlation. The covariance is \(\sigma_s^2\exp(-\phi h)\).
- Interpreting decay as a cutoff. Exponential correlation is positive at every finite distance; it becomes small asymptotically rather than suddenly becoming zero.
- Equating latent and response correlations. A covariance function for a GLMM latent effect does not directly give the response-scale correlation under a nonlinear link.
Check Your Understanding
Answer each question, then compare your work with the solutions below.
- A latent effect has \(\sigma_s^2=3\) and \(\phi=0.2\text{ m}^{-1}\). Find the correlation and covariance for locations 5 m apart.
- For an exponential spatial correlation, what distance gives correlation \(e^{-1}\)? Give the answer in terms of \(\phi\), including its units if \(\phi\) is measured in inverse kilometres.
- If the variance doubles while \(\phi\) remains fixed, what happens to the correlation at a given distance, and what happens to the covariance?
- Why is a single exchangeable covariance not equivalent to an exponential spatial covariance when the locations have different pairwise distances?
Solutions. (1) \(\rho(5)=e^{-(0.2)(5)}=e^{-1}=0.3679\). The covariance is \(3e^{-1}=1.104\) squared latent units. (2) Set \(e^{-\phi h}=e^{-1}\), so \(h=1/\phi\); when \(\phi\) is in \(\text{km}^{-1}\), this distance is in kilometres. (3) Correlation is unchanged because it depends only on \(\phi\) and distance. Covariance doubles because it is the variance multiplied by correlation. (4) Exchangeable covariance assigns the same covariance to every distinct pair, whereas the exponential covariance changes with pairwise distance; unequal distances generally yield unequal covariances.