Skip to main content
Log in

Automatic estimation of spatial spectra via smoothing splines

  • Original paper
  • Published:
Computational Statistics Aims and scope Submit manuscript

Abstract

Spectra are frequently used to depict the dependence features of a second-order stationary process. In this paper, the spatial log-spectral density is expressed by a new type of smoothing splines in the form of the summation of a linear expression of univariate bases and two quadratic forms of univariate bases. Based on this new type of smoothing splines, a Bayesian nonparametric method is proposed to estimate the spectral density of spatial data observed on a lattice. The proposed Bayesian approach uses a Hamiltonian Monte Carlo-within-Gibbs technique to fit smoothing splines to the spatial periodogram. Our technique produces an automatically smoothed spatial spectral estimate along with samples from the posterior distributions of the parameters to facilitate inference.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

References

  • Bandyopadhyay S, Lahiri SN (2009) Asymptotic properties of discrete Fourier transforms for spatial data. Sankhyā Ser A 71:221–259

    MathSciNet  MATH  Google Scholar 

  • Birr S, Volgushev S, Kley T, Dette H, Hallin M (2017) Quantile spectral analysis for locally stationary time series. J R Stat Soc B 79:1619–1643

    Article  MathSciNet  MATH  Google Scholar 

  • Brillinger DR (2001) Time series: data analysis and theory. SIAM, Philadephia

    Book  MATH  Google Scholar 

  • Choudhuri N, Ghosal S, Roy A (2004) Bayesian estimation of the spectral density of a time series. J Am Stat Assoc 99:1050–1059

    Article  MathSciNet  MATH  Google Scholar 

  • Cressie N (1993) Statistics for spatial data. Wiley, New York

    Book  MATH  Google Scholar 

  • Dawid AP (1981) Some matrix-variate distribution theory: notational considerations and a Bayesian application. Biometrika 68:265–274

    Article  MathSciNet  MATH  Google Scholar 

  • Dette H, Hallin M, Kley T, Volgushev S (2015) Of copulas, quantiles, ranks and spectra: an \(L_1\)-approach to spectral analysis. Bernoulli 21:781–831

    Article  MathSciNet  MATH  Google Scholar 

  • de Waal DJ (1988) Matrix-valued distributions. In: Kotz S, Johnson NL (eds) Encyclopedia of statisitcal sciences, 5. Wiley, New York, pp 326–333

    Google Scholar 

  • Doukhan P (1994) Mixing: properties and examples, vol 85. Lecture Notes in Statistics. Springer, New York

  • Dreesman JM, Tutz G (2001) Non-stationary conditional models for spatial data based on varying coefficients. J R Stat Soc D 50:1–15

    MathSciNet  Google Scholar 

  • Edsgärd D, Johnsson P, Sandberg R (2018) Identification of spatial expression trends in single-cell gene expression data. Nat Methods 15:339–342

    Article  Google Scholar 

  • Eubank RL (1999) Nonparametric regression and spline smoothing, 2nd edn. Marcel Dekker, New York

    Book  MATH  Google Scholar 

  • Fuentes M (2007) Approximate likelihood for large irregularly spaced spatial data. J Am Stat Assoc 102:321–331

    Article  MathSciNet  MATH  Google Scholar 

  • Fuentes M, Reich B (2010) Spectral domain. In: Gelfand AS, Diggle PJ, Fuentes M, Guttorp P (eds) Handbook of spatial statistics. Chapman & Hall/CRC, Boca Raton, pp 57–77

    Chapter  Google Scholar 

  • Gelman A (2006) Prior distributions for variance parameters in hierarchical models. Bayesian Anal 1:1–19

    Article  MathSciNet  MATH  Google Scholar 

  • Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB (2014) Bayesian data analysis, 3rd edn. Taylor & Francis Group, Boca Raton

    MATH  Google Scholar 

  • Goodman NR (1963) Statistical analysis based on a certain multivariate complex Gaussian distribution (an introduction). Ann Math Stat 34:152–177

    Article  MathSciNet  MATH  Google Scholar 

  • Gupta A (2018) Autoregressive spatial spectral estimates. J Econ 203:80–95

    Article  MathSciNet  MATH  Google Scholar 

  • Heyde CC, Gay R (1993) Smoothed periodogram asymptotics and estimation for processes and fields with possible long-range dependence. Stoch Proc Appl 45:169–182

    Article  MathSciNet  MATH  Google Scholar 

  • Horn RA, Johnson CR (2013) Matrix analysis, 2nd edn. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  • Jo S, Choi T, Park B, Lenk P (2019) bsamGP: an R Package for Bayesian spectral analysis models using Gaussian process priors. J Stat Softw 90(10)

  • Kley T, Volgushev S, Dette H, Hallin M (2016) Quantile spectral process: asymptotic analysis and inference. Bernoulli 22:1770–1807

    Article  MathSciNet  MATH  Google Scholar 

  • Krafty RT, Collinge WO (2013) Penalized multivariate Whittle likelihood for power spectrum estimation. Biometrika 100:447–458

    Article  MathSciNet  MATH  Google Scholar 

  • Krafty RT, Rosen O, Stoffer DS, Buysse DJ, Hall MH (2017) Conditional spectral analysis of replicated multiple time series with application to nocturnal physiology. J Am Stat Assoc 112:1405–1416

    Article  MathSciNet  Google Scholar 

  • Lahiri SN (2003) Central limit theorems for weighted sums of a spatial process under a class of stochastic and fixed designs. Sankhyā Ser A 65:1–33

    MathSciNet  Google Scholar 

  • Li Z, Krafty RT (2019) Adaptive Bayesian time-frequency analysis of multivariate time series. J Am.Stat Assoc 114:453–465

    Article  MathSciNet  MATH  Google Scholar 

  • Lu N, Zimmerman DL (2005) Testing for directional symmetry in spatial dependence using the periodogram. J Stat Plann Inference 129:369–385

    Article  MathSciNet  MATH  Google Scholar 

  • McBratney AB, Webster R (1981) Detection of ridge and furrow pattern by spectral analysis of crop yield. Int Stat Rev 49:45–52

    Article  Google Scholar 

  • Mercer WB, Hall AD (1911) The experimental error of field trials. J Agric Sci 4:107–132

    Article  Google Scholar 

  • Ombao H, Raz J, Von Sachs R, Malow B (2001) Automatic statistical analysis of bivariate nonstationary time series. J Am Stat Assoc 96:543–560

    Article  MathSciNet  MATH  Google Scholar 

  • Ripley BD (1981) Spatial statistics. Wiley, New York

    Book  MATH  Google Scholar 

  • Robinson PM (2007) Nonparametric spectrum estimation for spatial data. J Stat Plann Inference 137:1024–1034

    Article  MathSciNet  MATH  Google Scholar 

  • Rosen O, Stoffer DS (2007) Automatic estimation of multivariate spectra via smoothing splines. Biometrika 94:1–11

    Article  MathSciNet  MATH  Google Scholar 

  • Rosen O, Wood S, Stoffer DS (2009) Local spectral analysis via a Bayesian mixture of smoothing splines. J Am Stat Assoc 104:249–262

    Article  MathSciNet  MATH  Google Scholar 

  • Rosen O, Wood S, Stoffer D (2012) AdaptSPEC: adaptive spectral estimation for nonstationary time series. J Am Stat Assoc 107:1575–1589

    Article  MathSciNet  MATH  Google Scholar 

  • Shumway RH, Stoffer DS (2011) Time series analysis and its applications with R examples, 3rd edn. Springer, New York

    Book  MATH  Google Scholar 

  • Ståhl PL, Salmén F, Vickovic S et al (2016) Visualization and analysis of gene expression in tissue sections by spatial transcriptomics. Science 353:78–82

    Article  Google Scholar 

  • Sun S, Zhu J, Zhou X (2020) Statistical analysis of spatial expression patterns for spatially resolved transcriptomic studies. Nat Methods 17:193–200

    Article  Google Scholar 

  • Svensson V, Teichmann SA, Stegle O (2018) SpatialDE: identification of spatially variable genes. Nat Methods 15:343–346

    Article  Google Scholar 

  • Villar DP (2017) Local stationarity for spatial data. Technische Universität Kaiserslautern (Doctoral dissertation)

  • Whittle P (1957) Curve and periodogram smoothing. J R Stat Soc B Stat Methodol 19:38–47

    MathSciNet  MATH  Google Scholar 

  • Zhang S (2016) Adaptive spectral estimation for nonstationary multivariate time series. Comput Stat Data Anal 103:330–349

    Article  MathSciNet  MATH  Google Scholar 

  • Zhang S (2019) Bayesian copula spectra analysis for stationary time series. Comput Stat Data Anal 133:166–179

    Article  MATH  Google Scholar 

  • Zhang S (2020) Nonparametric Bayesian inference for the spectral density based on irregularly space data. Comput Stat Data Anal 151:107019

    Article  MATH  Google Scholar 

  • Zheng Y, Zhu J, Roy A (2010) Nonparametric Bayesian inference for the spectral density function of a random field. Biometrika 97:238–245

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

I would like thank all the reviewers for their helpful comments and constructive suggestions. This work was supported by the National Natural Science Foundation of China under grant number 11671416 and the Natural Science Foundation of Shanghai under Grant Number 20JC1413800.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shibin Zhang.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary material 1 (pdf 1346 KB)

Appendices

Appendix A. The Hamiltonian Monte Carlo step in Sect. 3

In what follows, the current and proposed values of \(\varvec{\beta }\), \(\mathbf {B}_1\) and \(\mathbf {B}_2\) are denoted by the superscripts c and p, respectively. Suppose the chains for \(\varvec{\beta }\), \(\mathbf {B}_1\) and \(\mathbf {B}_2\) are currently at \(\varvec{\beta }^c\), \(\mathbf {B}_1^c\) and \(\mathbf {B}_2^c\), respectively. As an illustration, we only state the details of the steps for sampling \(\varvec{\beta }^p\) and \(\mathbf {B}_1^p\). Given \(\mathbf {B}_1^c\), \(\mathbf {B}_2^c\), \(\lambda _0\) and \(I_{n}(\varvec{\omega })\), \(\varvec{\omega }\in \Omega _n\), the Hamiltonian Monte Carlo (HMC) is designed to sample \(\varvec{\beta }^p\) jointly from \(p\big (\varvec{\beta } \big |\lambda _0,\mathbf {B}_1^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )\). Given \(\varvec{\beta }^c\), \(\mathbf {B}_2^c\), \(\lambda _1\) and \(I_{n}(\varvec{\omega })\), \(\varvec{\omega }\in \Omega _n\), the Hamiltonian Monte Carlo (HMC) is designed to sample \(\mathbf {B}_1^p\) jointly from \(p\big (\mathbf {B}_1 \big |\lambda _1,\varvec{\beta }^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )\).

1.1 Appendix A.1. The gradients

For notational brevity, we omit the arguments of p in the following. By taking the derivative of \(\log p\) with respect to \(\varvec{\beta }\), we obtain

$$\begin{aligned} \frac{\partial \log p}{\partial \varvec{\beta }}=&-\frac{1}{2}\sum _{(\omega _1,\omega _2) \in \Omega _n} \Big \{\Big [1-I_{n}(\omega _1,\omega _2) \exp \big (-F(\omega _1,\omega _2)\big )\Big ] \nonumber \\&\quad \Big (\varvec{\varsigma } \odot \varvec{\varphi }_{J_1,J_2}(\omega _1,\omega _2)\Big )\Big \}-\Sigma ^{-1} \varvec{\beta }. \end{aligned}$$
(A.1)

By taking the derivative of \(\log p\) with respect to the matrices \(\mathbf {B}_1\) and \(\mathbf {B}_2\) (cf. Horn and Johnson 2013), respectively, we obtain

$$\begin{aligned} \frac{\partial \log p}{\partial \mathbf {B}_1}=&-\frac{1}{2}\sum _{(\omega _1,\omega _2) \in \Omega _n} \Big \{\Big [1-I_{n}(\omega _1,\omega _2) \exp \big (-F(\omega _1,\omega _2)\big )\Big ] \nonumber \\&\quad \Big (\Lambda \odot \varvec{\psi }_{J_1}\big (\omega _1\big ) \varvec{\psi }_{J_2}\big (\omega _2\big )^T\Big )\Big \}-\lambda _1^{-1} \mathbf {B}_1, \end{aligned}$$
(A.2)

and

$$\begin{aligned} \frac{\partial \log p}{\partial \mathbf {B}_2}=&-\frac{1}{2}\sum _{(\omega _1,\omega _2) \in \Omega _n} \Big \{\Big [1-I_{n}(\omega _1,\omega _2) \exp \big (-F(\omega _1,\omega _2)\big )\Big ] \\&\quad \Big (\Lambda \odot \varvec{\phi }_{J_1}\big (\omega _1\big ) \varvec{\phi }_{J_2}\big (\omega _2\big )^T\Big )\Big \}-\lambda _2^{-1} \mathbf {B}_2. \end{aligned}$$

1.2 Appendix A.2. The HMC step for sampling \(\varvec{\beta }\)

Let \(\mathbf{m} \) be the momentum vector with the same dimension as \(\varvec{\beta }\). We give \(\mathbf{m} \) a multivariate normal distribution, \(N(\mathbf {0},\kappa ^2\, I_{J_1+J_2+1})\), where \(\kappa >0\).

Recall that the current value of \(\varvec{\beta }\) is \(\varvec{\beta }^c\). The HMC begins by drawing \(\mathbf{m} \) from \(N(\mathbf {0},\kappa ^2\, I_{J_1+J_2+1})\), say \(\mathbf{m} ^c\). Then it proceeds by updating \(\mathbf{m} \) and \(\varvec{\beta }\) simultaneously, with L ‘leapfrog steps’ scaled by a factor \(\epsilon \). Each leapfrog step consists of three parts as follows.

(a) Use the gradient (A.1) to make a half-step of \(\mathbf{m} \):

$$\begin{aligned} \mathbf{m} \longleftarrow \mathbf{m} +\frac{1}{2}\epsilon \frac{\partial \log p}{\partial \varvec{\beta }}. \end{aligned}$$

(b) Use the momentum matrix \(\mathbf{m} \) to update \(\varvec{\beta }\):

$$\begin{aligned} \varvec{\beta } \longleftarrow \varvec{\beta }+\epsilon \,\kappa ^{-2} \mathbf{m} . \end{aligned}$$

(c) Again use the gradient (A.1) to half-update \(\mathbf{m} \):

$$\begin{aligned} \mathbf{m} \longleftarrow \mathbf{m} +\frac{1}{2}\epsilon \frac{\partial \log p}{\partial \varvec{\beta }}. \end{aligned}$$

We label \(\mathbf{m} ^\prime \) and \(\varvec{\beta }^\prime \) as the value of \(\mathbf{m} \) and \(\varvec{\beta }\) after the L leapfrog steps. Let

$$\begin{aligned} A=\frac{p\big (\varvec{\beta }^\prime |\lambda _0, \mathbf {B}_1^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )p(M^\prime )}{p\big (\varvec{\beta }^c|\lambda _0, \mathbf {B}_1^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )p(M^c)}, \end{aligned}$$

where the unconditional density \(p(\cdot )\) is the probability density function of \(N(\mathbf {0},\kappa ^2\, I_{J_1+J_2+1})\). The updating of \(\varvec{\beta }\) is completed by setting \(\varvec{\beta }^{p}=\varvec{\beta }^\prime \) with probability \(\min (1,A)\), and \(\varvec{\beta }^{p}=\varvec{\beta }^c\), otherwise.

1.3 Appendix A.3. The HMC step for sampling \(\mathbf{B} _1\)

Let M be the momentum matrix with the same dimension as \(\mathbf {B}_1\). We give M a matrix-valued normal distribution, \(\mathcal {MN}_{J_1,J_2}(\mathbf {O},\widetilde{U},\widetilde{V})\). To keep it simple, we assume \(\widetilde{U}=\kappa I_{J_1}\) and \(\widetilde{V}=\kappa I_{J_2}\), where \(\kappa >0\).

Recall that the current value of \(\mathbf {B}_1\) is \(\mathbf {B}_1^c\). The HMC begins by drawing M from \(\mathcal {MN}_{J_1,J_2}(\mathbf {O},\widetilde{U},\widetilde{V})\), say \(M^c\). Then it proceeds by updating M and \(\mathbf {B}_1\) simultaneously, with L ‘leapfrog steps’ scaled by a factor \(\epsilon \). Each leapfrog step consists of three parts as follows.

(a) Use the gradient (A.2) to make a half-step of M:

$$\begin{aligned} M\longleftarrow M+\frac{1}{2}\epsilon \frac{\partial \log p}{\partial \mathbf {B}_1}. \end{aligned}$$

(b) Use the momentum matrix M to update \(\mathbf {B}_1\):

$$\begin{aligned} \mathbf {B}_1 \longleftarrow \mathbf {B}_1+\epsilon \,\widetilde{U}^{-1} M (\widetilde{V}^{-1})^T. \end{aligned}$$

In our settings, it holds that \(\widetilde{U}^{-1} M (\widetilde{V}^{-1})^T=\kappa ^{-2} M\).

(c) Again use the gradient (A.2) to half-update M:

$$\begin{aligned} M\longleftarrow M+\frac{1}{2}\epsilon \frac{\partial \log p}{\partial \mathbf {B}_1}. \end{aligned}$$

We label \(M^\prime \) and \(\mathbf {B}_1^\prime \) as the value of M and \(\mathbf {B}_1\) after the L leapfrog steps. Let

$$\begin{aligned} A=\frac{p\big (\mathbf {B}_1^\prime \big |\lambda _1,\varvec{\beta }^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )p(M^\prime )}{p\big (\mathbf {B}_1^c \big |\lambda _1,\varvec{\beta }^c,\mathbf {B}_2^c, I_{n}(\varvec{\omega }), \varvec{\omega }\in \Omega _n\big )p(M^c)}, \end{aligned}$$

where the unconditional density \(p(\cdot )\) is the pdf of \(\mathcal {MN}_{J_1,J_2}(\mathbf {O},\widetilde{U},\widetilde{V})\). The updating of \(\mathbf {B}_1\) is completed by setting \(\mathbf {B}_1^{p}=\mathbf {B}_1^\prime \) with probability \(\min (1,A)\), and \(\mathbf {B}_1^{p}=\mathbf {B}_1^c\), otherwise.

1.4 Appendix A.4. Choice of tuning parameters

As suggested by Gelman et al. (2014), we set the product \(\epsilon \, L\) to 1. Then the HMC requires only two tuning parameters: the scale parameter \(\kappa \) and the number of leapfrog steps L.

Actually, it produces no clear difference for the updating ratios of \(\mathbf {B}=\{\varvec{\beta },\mathbf {B}_1,\mathbf {B}_2\}\) in the iterative steps if ranging L from 5 to 20 in our simulation and data analysis. In this article, we set L to 10, which can ensure that the updating ratios of \(\mathbf {B}\) in the iterative steps are 90% in all our simulation examples, so that we recommend 10 to be the default setting of L in applications.

The rest of this appendix pertains to setting the scale parameter \(\kappa \). For fixed \(L=10\), the proposed approach produces indistinguishable results if ranging \(\kappa \) from 5 to 50 in our simulation and data analysis. However, we find that for the autocorrelation of Markov Chain Monte Carlo (MCMC) sample of each posterior parameter decays more rapidly with smaller 5. Therefore, we set \(\kappa \) to 5 in all the examples and applications in this article.

Appendix B. Supplementary material

Supplementary materials related to this article, including a supplementary file and some R programs, are available at https://doi.org/10.1007/s00180-021-01141-z.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Zhang, S. Automatic estimation of spatial spectra via smoothing splines. Comput Stat 37, 565–590 (2022). https://doi.org/10.1007/s00180-021-01141-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00180-021-01141-z

Keywords

Navigation