## 1. Introduction

Gaussian fields (GFs) have a dominant role in spatial statistics and especially in the traditional field of geostatistics (Cressie, 1993; Stein, 1999; Chilés and Delfiner, 1999; Diggle and Ribeiro, 2006) and form an important building block in modern hierarchical spatial models (Banerjee *et al.*, 2004). GFs are one of a few appropriate multivariate models with an explicit and computable normalizing constant and have good analytic properties otherwise. In a domain with co-ordinate , *x*(**s**) is a continuously indexed GF if all finite collections {*x*(**s**_{i})} are jointly Gaussian distributed. In most cases, the GF is specified by using a mean function *μ*(·) and a covariance function *C*(·,·), so the mean is ** μ**=(

*μ*(

**s**

_{i})) and the covariance matrix is

**Σ**=(

*C*(

**s**

_{i},

**s**

_{j})). Often the covariance function is only a function of the relative position of two locations, in which case it is said to be stationary, and it is isotropic if the covariance functions depends only on the Euclidean distance between the locations. Since a regular covariance matrix is positive definite, the covariance function must be a positive definite function. This restriction makes it difficult to ‘invent’ covariance functions stated as closed form expressions. Bochner's theorem can be used in this context, as it characterizes all continuous positive definite functions in .

Although GFs are convenient from both an analytical and a practical point of view, the computational issues have always been a bottleneck. This is due to the general cost of to factorize dense *n*×*n* (covariance) matrices. Although the computational power today is at an all time high, the tendency seems to be that the dimension *n* is always set, or we want to set it, a little higher than the value that gives a reasonable computation time. The increasing popularity of hierarchical Bayesian models has made this issue more important, as ‘repeated computations (as for simulation-based model fitting) can be very slow, perhaps infeasible’ (Banerjee *et al.* (2004), page 387), and the situation is informally referred to as ‘the big *n* problem’.

There are several approaches to try to overcome or avoid ‘the big *n* problem’. The spectral representation approach for the likelihood (Whittle, 1954) makes it possible to estimate the (power) spectrum (using discrete Fourier transforms calculations) and to compute the log-likelihood from it (Guyon, 1982; Dahlhaus and Künsch, 1987; Fuentes, 2008) but this is only possible for directly observed stationary GFs on a (near) regular lattice. Vecchia (1988) and Stein *et al.* (2004) proposed to use an approximate likelihood constructed through a sequential representation and then to simplify the conditioning set, and similar ideas also apply when computing conditional expectations (kriging). An alternative approach is to do exact computations on a simplified Gaussian model of low rank (Banerjee *et al.*, 2008; Cressie and Johannesson, 2008; Eidsvik *et al.*, 2010). Furrer *et al.* (2006) applied covariance tapering to zero-out parts of the covariance matrix to gain a computational speed-up. However, the sparsity pattern will depend on the range of the GFs, and the potential in a related approach, named ‘lattice methods’ by Banerjee *et al.* (2004), section A.5.3, is superior to the covariance tapering idea. In this approach the GF is replaced by a Gaussian Markov random field (GMRF); see Rue and Held (2005) for a detailed introduction and Rue *et al.* (2009), section 2.1, for a condensed review. A GMRF is a discretely indexed Gaussian field **x**, where the full conditionals *π*(*x*_{i}|**x**_{−i}), *i*=1,…,*n*, depend only on a set of neighbours ∂*i* to each site *i* (where consistency requirements imply that if *i* ∈ ∂*j* then also *j* ∈ ∂*i*). The computational gain comes from the fact that the zero pattern of the precision matrix **Q** (the inverse covariance matrix) relates directly to the notion of neighbours; *Q*_{ij}≠0*i* ∈ ∂*j*∪*j*; see, for example, Rue and Held (2005),section 2.2. Algorithms for Markov chain Monte Carlo sampling will repeatedly update from these simple full conditionals, which explains to a large extent the popularity of GMRFs in recent years, starting already with the seminal papers by Besag (1974, 1975). However, GMRFs also allow for fast direct numerical algorithms (Rue, 2001), as numerical factorization of the matrix **Q** can be done by using sparse matrix algorithms (George and Liu, 1981; Duff *et al.*, 1989; Davis, 2006) at a typical cost of for two-dimensional GMRFs; see Rue and Held (2005) for detailed algorithms. GMRFs have very good computational properties, which are of major importance in Bayesian inferential methods. This is further enhanced by the link to nested integrated Laplace approximations (Rue *et al.*, 2009), which allow fast and accurate Bayesian inference for latent GF models.

Although GMRFs have very good computational properties, there are reasons why current statistical models based on GMRFs are relatively simple, in particular when applied to area data from regions or counties. First, there has been no good way to parameterize the precision matrix of a GMRF to achieve predefined behaviour in terms of correlation between two sites and to control marginal variances. In matrix terms, the reason for this is that one must construct a positive definite precision matrix to obtain a positive definite covariance matrix as its inverse, so the conditions for proper covariance matrices are replaced by essentially equivalent conditions for sparse precision matrices. Therefore, often simplistic approaches are taken, like letting *Q*_{ij} be related to the reciprocal distance between sites *i* and *j* (Besag *et al.*, 1991; Arjas and Gasbarra, 1996; Weir and Pettitt, 2000; Pettitt *et al.*, 2002; Gschlößl and Czado, 2007); however, a more detailed analysis shows that such a rationale is suboptimal (Besag and Kooperberg, 1995; Rue and Tjelmeland, 2002) and can give surprising effects (Wall, 2004). Secondly, it is unclear how large the class of useful GMRF models really is by using only a simple neighbourhood. The complicating issue here is the global positive definiteness constraint, and it might not be evident how this influences the parameterization of the full conditionals.

Rue and Tjelmeland (2002) demonstrated empirically that GMRFs could closely approximate most of the commonly used covariance functions in geostatistics, and they proposed to use them as computational replacements for GFs for computational reasons like doing kriging (Hartman and Hössjer, 2008). However, there were several drawbacks with their approach; first, the fitting of GMRFs to GFs was restricted to a regular lattice (or torus) and the fit itself had to be precomputed for a discrete set of parameter values (like smoothness and range), using a time-consuming numerical optimization. Despite these ‘proof-of-concept’ results, several researchers have followed up this idea without any notable progress in the methodology (Hrafnkelsson and Cressie, 2003; Song *et al.*, 2008; Cressie and Verzelen, 2008), but the approach itself has shown to be useful even for spatiotemporal models (Allcroft and Glasbey, 2003).

The discussion so far has revealed a modelling or computational strategy for approaching the big *n* problem in a seemingly good way.

- (a) Do the modelling by using a GF on a set of locations {
**s**_{i}}, to construct a discretized GF with covariance matrix**Σ**. - (b) Find a GMRF with local neighbourhood and precision matrix
**Q**that*represents*the GF in the best possible way, i.e.**Q**^{−1}is close to**Σ**in some norm. (We deliberately use the word ‘represents’ instead of approximates.) - (c) Do the computations using the GMRF representation by using numerical methods for sparse matrices.

Such an approach relies on several assumptions. First the GF must be of such a type that there is a GMRF with local neighbourhood that can represent it sufficiently accurately to maintain the interpretation of the parameters and the results. Secondly, we must be able to compute the GMRF representation from the GF, at any collections of locations, so fast that we still achieve a considerable speed-up compared with treating the GF directly.

The purpose of this paper is to demonstrate that these requirements can indeed be met for certain members of GFs with the Matérn covariance function in , where the GMRF representation is available explicitly. Although these results are seemingly restrictive at first sight, they cover the most important and most used covariance model in spatial statistics; see Stein (1999), page 14, which concluded a detailed theoretical analysis with ‘*Use the Matérn model*’. The GMRF representation can be constructed explicitly by using a certain stochastic partial differential equation (SPDE) which has GFs with Matérn covariance function as the solution when driven by Gaussian white noise. The result is a basis function representation with piecewise linear basis functions, and Gaussian weights with Markov dependences determined by a general triangulation of the domain.

Rather surprisingly, extending this basic result seems to open new doors and opportunities, and to provide quite simple answers to rather difficult modelling problems. In particular, we shall show how this approach extends to Matérn fields on manifolds, non-stationary fields and fields with oscillating covariance functions. Further, we shall discuss the link to the deformation method of Sampson and Guttorp (1992) for non-stationary covariances for non-isotropic models, and how our approach naturally extends to non-separable space–time models. Our basic task, to do the modelling by using GFs and the computations by using the GMRF representation, still holds for these extensions as the GMRF representation is still available explicitly. An important observation is that the resulting modelling strategy does not involve having to construct explicit formulae for the covariance functions, which are instead only defined implicitly through the SPDE specifications.

The plan of the rest of this paper is as follows. In Section 2, we discuss the relationship between Matérn covariances and a specific SPDE, and we present the two main results for explicitly constructing the precision matrices for GMRFs based on this relationship. In Section 3, the results are extended to fields on triangulated manifolds, non-stationary and oscillating models, and non-separable space–time models. The extensions are illustrated with a non-stationary analysis of global temperature data in Section 4, and we conclude the main part of the paper with a discussion in Section 5. Thereafter follow four technical appendices, with explicit representation results (A), theory for random fields on manifolds (B), the Hilbert space representation details (C) and proofs of the technical details (D).