Tutorials › Generalized Linear Mixed Models (GLMM) › Separable Space-Time Covariance Models

Spatial and Temporal Correlation · Tutorial 596 of 698

Separable Space-Time Covariance Models

Learn to calculate and interpret latent-effect covariance between location-time pairs when spatial and temporal dependence combine separably.

Advanced 11 min read

What You'll Learn

  • Define separability using a marginal variance and normalized spatial and temporal correlation functions.
  • Calculate covariance between two location-time pairs using spatial distance and temporal lag.
  • Justify why the product of valid spatial and temporal correlation kernels is a valid covariance kernel.
  • Interpret the restrictions separability places on spatial and temporal dependence.
  • Identify diagnostics and modeling alternatives when separability is not plausible.

Why Combine Space and Time Through a Product?

A spatial random effect can represent residual similarity among nearby locations, while a temporal random effect can represent similarity among observations made at nearby times. When observations are indexed by both location and time, one possible model says that their latent effects are similar when they are close in both dimensions. A separable covariance expresses this idea with a product: spatial similarity multiplied by temporal similarity.

The product is a substantive modeling assumption, not just a convenient calculation. It says that the spatial correlation pattern is the same at every temporal lag, and that the temporal correlation pattern is the same for every spatial pair. The assumption is useful when plausible, but it can be too restrictive when spatial dependence changes over time.

Definition and GLMM Context

Let \(b(s,t)\) be a mean-zero latent random effect at spatial location \(s\) and time \(t\). For observation \(i\), a GLMM may include this effect in its linear predictor:

$$ g\{E(Y_i\mid b)\}=x_i^\mathsf{T}\beta+b(s_i,t_i). $$

Here \(g\) is the link function, \(x_i\) is the covariate vector, and \(\beta\) is the fixed-effect coefficient vector. The covariance below describes the latent effect \(b\), not directly the covariance of the observed responses. A common GLMM specification also assumes that responses are conditionally independent given the latent effects and covariates, with a suitable response distribution and link.

Definition: A space-time covariance model is separable if the covariance between two latent effects factors into a spatial term and a temporal term. In the normalized stationary form used here, $$ \operatorname{Cov}\{b(s,t),b(s',t')\} =\tau^2 r_S(s,s')r_T(t,t'), $$ where \(\tau^2>0\) is the marginal variance, \(r_S\) is a valid spatial correlation function with \(r_S(s,s)=1\), and \(r_T\) is a valid temporal correlation function with \(r_T(t,t)=1\).

Because both correlation functions equal one on their diagonals, \(\operatorname{Var}\{b(s,t)\}=\tau^2\) at every location and time. The correlation between two latent effects is therefore \(r_S(s,s')r_T(t,t')\). Equivalently, one can write the covariance as a product of spatial and temporal covariance functions, provided the scaling is defined consistently. Using normalized correlations and one variance parameter makes that scaling explicit.

A covariance function must be valid: for any finite collection of indexed points and any real coefficients, the quadratic form formed from its covariance values must be nonnegative. This condition is what makes the specified values compatible with a random field.

Why the Product Is a Valid Covariance

Assume \(r_S\) and \(r_T\) are valid correlation kernels on their respective domains. A standard property of valid kernels is that each can be represented as an inner product: there are feature maps \(\phi\) and \(\psi\) such that \(r_S(s,s')=\langle\phi(s),\phi(s')\rangle\) and \(r_T(t,t')=\langle\psi(t),\psi(t')\rangle\). The product is the inner product of the corresponding product features.

$$ r_S(s,s')r_T(t,t') = \left\langle \phi(s)\otimes\psi(t),\, \phi(s')\otimes\psi(t') \right\rangle. $$

For any finite collection \((s_i,t_i)\) and coefficients \(c_i\), the quadratic form for the proposed covariance is consequently

$$ \sum_i\sum_j c_i c_j \tau^2 r_S(s_i,s_j)r_T(t_i,t_j) = \tau^2\left\|\sum_i c_i\,\phi(s_i)\otimes\psi(t_i)\right\|^2 \geq 0. $$

Since \(\tau^2>0\), the right-hand side cannot be negative. The product therefore defines a valid covariance kernel. This justification depends on both component functions being valid kernels; multiplying arbitrary functions that happen to look like correlations does not guarantee a valid covariance.

Calculating Covariance for Location-Time Pairs

A common choice uses exponential decay in spatial distance and elapsed time. Let \(d(s,s')\) be a distance between locations, \(\phi>0\) a spatial range parameter, and \(\lambda>0\) a temporal decay parameter:

$$ r_S(s,s')=\exp\{-d(s,s')/\phi\}, \qquad r_T(t,t')=\exp\{-|t-t'|/\lambda\}. $$

Both functions equal one when the two indices match, and their values decrease as spatial distance or temporal separation increases. The covariance calculation is then to evaluate both correlations and multiply them by \(\tau^2\).

Worked Example: Exponential Decay in Space and Time

Suppose a hypothetical latent field has marginal variance \(\tau^2=4\), spatial correlation \(r_S(s,s')=\exp\{-d(s,s')/8\}\), and temporal correlation \(r_T(t,t')=\exp\{-|t-t'|/3\}\). Find the covariance for two location-time pairs separated by 4 distance units and 2 time units.

The spatial correlation is \(r_S=\exp(-4/8)=\exp(-0.5)\approx 0.6065\). The temporal correlation is \(r_T=\exp(-2/3)\approx 0.5134\). Thus

$$ \begin{aligned} \operatorname{Cov}\{b(s,t),b(s',t')\} &=4(0.6065)(0.5134)\\ &\approx 1.246. \end{aligned} $$

The corresponding latent-effect correlation is \(1.246/4\approx 0.3115\), equivalently the product of the two correlations. The covariance has the units of the latent effect squared; the correlation is unitless. The calculation is valid under the stated model because both component functions are normalized valid exponential correlation functions and the marginal variance is positive.

Worked Example: An AR(1) Time Component

Consider a hypothetical field observed at integer time points. Let \(\tau^2=2.5\), \(r_S(s,s')=\exp\{-d(s,s')/10\}\), and \(r_T(t,t')=0.6^{|t-t'|}\). Calculate the covariance for locations 5 distance units apart and observations two time steps apart.

The spatial correlation is \(\exp(-5/10)=\exp(-0.5)\approx 0.6065\). The temporal correlation is \(0.6^2=0.36\). Therefore,

$$ \operatorname{Cov}\{b(s,t),b(s',t')\} =2.5(0.6065)(0.36) \approx 0.5459. $$

The latent-effect correlation is \(0.6065(0.36)\approx 0.2183\). The AR(1) factor is appropriate here because the time points are equally spaced integer indices and \(0.6\) is within the stationary AR(1) range \((-1,1)\). If observation times are irregular, replacing the lag by an integer step count would not reflect actual elapsed time; a continuous-time temporal correlation may be more appropriate.

Worked Example: The Same Spatial Pair at Two Time Lags

Suppose a hypothetical separable field has \(\tau^2=9\). For a particular pair of locations, let \(r_S(s,s')=0.7\). Use a valid temporal correlation with \(r_T\) equal to \(0.8\) at lag 1 and \(0.8^3=0.512\) at lag 3. Find the covariance at each lag.

At lag 1,

$$ 9(0.7)(0.8)=5.04. $$

At lag 3,

$$ 9(0.7)(0.512)=3.2256. $$

The longer lag reduces covariance through the temporal factor, while the spatial factor remains \(0.7\). This invariance is central to separability: the same spatial pair contributes the same spatial multiplier regardless of the temporal lag. Conversely, holding the time lag fixed means the temporal multiplier does not change with the spatial pair.

What Separability Assumes—and What It Does Not

A separable covariance does not mean that space and time are independent. Except where a component correlation is zero, the product generally gives nonzero covariance across both different locations and different times. Nor does the word “separable” mean that the response variables themselves are independent. It describes the factorization of the latent covariance.

The model does impose a specific relationship between spatial and temporal dependence. For example, under the product form, the ratio of covariances for two temporal lags at a fixed spatial pair is determined only by the temporal correlation ratio, when the denominator is nonzero. The temporal decay pattern cannot change from one spatial separation to another. If this restriction is implausible, a model with a more flexible space-time covariance may be needed.

The formula also presumes that the chosen spatial and temporal kernels are appropriate for the domains and sampling design. A spatial distance must be meaningful for the locations; a temporal lag must use the actual time scale intended by the model. For stationary kernels with constant variance, the correlations depend on spatial separation and temporal lag rather than absolute location and time. Nonstationary components require explicit care in defining and interpreting their covariance.

Diagnostics, Alternatives, and Limitations

The separability assumption is difficult to assess from raw outcomes alone because the latent field is not directly observed. In a GLMM, fixed effects and the response distribution also affect observed patterns. Useful checks therefore focus on whether the fitted model can reproduce dependence patterns that matter for the application, using residual summaries or replicated data while accounting for the fitted mean and response model.

  • Compare spatial dependence across time lags. If estimated or replicated spatial association changes systematically with temporal lag in a way the product cannot reproduce, separability may be inadequate.
  • Compare temporal dependence across spatial distances. A temporal decay that appears substantially different for near and far location pairs conflicts with the shared temporal factor.
  • Check the design and scale. Sparse coverage of some location-time combinations, irregular timing, or a poorly chosen spatial distance can make apparent covariance patterns unstable or misleading.
  • Assess uncertainty, not just a fitted surface. Estimated latent effects are uncertain, especially with sparse data. Patterns in their conditional estimates are not direct observations of the underlying covariance.

A separable model is often more economical and interpretable than a more flexible nonseparable alternative, but it can underrepresent dependence if spatial and temporal behavior interact. An additive construction, in which distinct spatial and temporal random effects contribute separate covariance components, is another modeling choice; it implies a different covariance structure rather than the product used here. The appropriate choice depends on the scientific question, design, and amount of information available. This tutorial concerns the latent covariance component: translating it into response-scale correlation requires additional distribution- and link-specific reasoning.

StructureCovariance ideaKey implication
Separable productSpatial correlation multiplied by temporal correlationEach dimension's correlation pattern is unchanged across the other dimension.
Additive componentsSeparate spatial and temporal covariance contributions are addedDependence is built from components, not a product of correlations.
Nonseparable structureJoint space-time dependence is not restricted to a productSpatial dependence may vary with time lag, or temporal dependence with spatial separation.
Key takeaway: Under a separable model, the latent covariance for two location-time pairs is the marginal variance times a spatial correlation times a temporal correlation. The arithmetic is simple; the important modeling decision is whether the same spatial and temporal patterns can reasonably apply across the other dimension.

Check Your Understanding

Answer each question, then compare your work with the solutions below.

  1. A field has \(\tau^2=6\), spatial correlation \(0.5\), and temporal correlation \(0.4\) for a specified pair of indices. What are the covariance and correlation?
  2. For \(r_S(s,s')=\exp\{-d(s,s')/5\}\), what is the spatial correlation at distance 5? If the temporal correlation for the pair is \(0.7\) and \(\tau^2=3\), what is the space-time covariance?
  3. In a separable model, does the temporal correlation function change when the spatial separation changes? Explain the consequence.
  4. Why is a product of two valid correlation kernels a valid space-time covariance kernel?

Solutions. (1) The covariance is \(6(0.5)(0.4)=1.2\). Since the marginal variance is 6, the correlation is \(1.2/6=0.2\), also the product \(0.5(0.4)\). (2) The spatial correlation is \(\exp(-5/5)=\exp(-1)\approx0.3679\). The covariance is \(3(0.3679)(0.7)\approx0.7726\). (3) No. The temporal factor depends only on the time pair. Consequently, the model requires the same temporal correlation pattern at every spatial pair; a temporal pattern that changes with distance would violate separability. (4) Each valid kernel has an inner-product representation. The product kernel is the inner product of the paired product features, so every finite covariance quadratic form is a nonnegative squared norm multiplied by the positive variance \(\tau^2\).

Clinical Biostats