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.
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
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
Brillinger DR (2001) Time series: data analysis and theory. SIAM, Philadephia
Choudhuri N, Ghosal S, Roy A (2004) Bayesian estimation of the spectral density of a time series. J Am Stat Assoc 99:1050–1059
Cressie N (1993) Statistics for spatial data. Wiley, New York
Dawid AP (1981) Some matrix-variate distribution theory: notational considerations and a Bayesian application. Biometrika 68:265–274
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
de Waal DJ (1988) Matrix-valued distributions. In: Kotz S, Johnson NL (eds) Encyclopedia of statisitcal sciences, 5. Wiley, New York, pp 326–333
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
Edsgärd D, Johnsson P, Sandberg R (2018) Identification of spatial expression trends in single-cell gene expression data. Nat Methods 15:339–342
Eubank RL (1999) Nonparametric regression and spline smoothing, 2nd edn. Marcel Dekker, New York
Fuentes M (2007) Approximate likelihood for large irregularly spaced spatial data. J Am Stat Assoc 102:321–331
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
Gelman A (2006) Prior distributions for variance parameters in hierarchical models. Bayesian Anal 1:1–19
Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB (2014) Bayesian data analysis, 3rd edn. Taylor & Francis Group, Boca Raton
Goodman NR (1963) Statistical analysis based on a certain multivariate complex Gaussian distribution (an introduction). Ann Math Stat 34:152–177
Gupta A (2018) Autoregressive spatial spectral estimates. J Econ 203:80–95
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
Horn RA, Johnson CR (2013) Matrix analysis, 2nd edn. Cambridge University Press, Cambridge
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
Krafty RT, Collinge WO (2013) Penalized multivariate Whittle likelihood for power spectrum estimation. Biometrika 100:447–458
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
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
Li Z, Krafty RT (2019) Adaptive Bayesian time-frequency analysis of multivariate time series. J Am.Stat Assoc 114:453–465
Lu N, Zimmerman DL (2005) Testing for directional symmetry in spatial dependence using the periodogram. J Stat Plann Inference 129:369–385
McBratney AB, Webster R (1981) Detection of ridge and furrow pattern by spectral analysis of crop yield. Int Stat Rev 49:45–52
Mercer WB, Hall AD (1911) The experimental error of field trials. J Agric Sci 4:107–132
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
Ripley BD (1981) Spatial statistics. Wiley, New York
Robinson PM (2007) Nonparametric spectrum estimation for spatial data. J Stat Plann Inference 137:1024–1034
Rosen O, Stoffer DS (2007) Automatic estimation of multivariate spectra via smoothing splines. Biometrika 94:1–11
Rosen O, Wood S, Stoffer DS (2009) Local spectral analysis via a Bayesian mixture of smoothing splines. J Am Stat Assoc 104:249–262
Rosen O, Wood S, Stoffer D (2012) AdaptSPEC: adaptive spectral estimation for nonstationary time series. J Am Stat Assoc 107:1575–1589
Shumway RH, Stoffer DS (2011) Time series analysis and its applications with R examples, 3rd edn. Springer, New York
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
Sun S, Zhu J, Zhou X (2020) Statistical analysis of spatial expression patterns for spatially resolved transcriptomic studies. Nat Methods 17:193–200
Svensson V, Teichmann SA, Stegle O (2018) SpatialDE: identification of spatially variable genes. Nat Methods 15:343–346
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
Zhang S (2016) Adaptive spectral estimation for nonstationary multivariate time series. Comput Stat Data Anal 103:330–349
Zhang S (2019) Bayesian copula spectra analysis for stationary time series. Comput Stat Data Anal 133:166–179
Zhang S (2020) Nonparametric Bayesian inference for the spectral density based on irregularly space data. Comput Stat Data Anal 151:107019
Zheng Y, Zhu J, Roy A (2010) Nonparametric Bayesian inference for the spectral density function of a random field. Biometrika 97:238–245
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
Corresponding author
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.
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
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
and
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} \):
(b) Use the momentum matrix \(\mathbf{m} \) to update \(\varvec{\beta }\):
(c) Again use the gradient (A.1) to half-update \(\mathbf{m} \):
We label \(\mathbf{m} ^\prime \) and \(\varvec{\beta }^\prime \) as the value of \(\mathbf{m} \) and \(\varvec{\beta }\) after the L leapfrog steps. Let
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:
(b) Use the momentum matrix M to update \(\mathbf {B}_1\):
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:
We label \(M^\prime \) and \(\mathbf {B}_1^\prime \) as the value of M and \(\mathbf {B}_1\) after the L leapfrog steps. Let
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
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00180-021-01141-z