detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · detection...

22
© 2016 Royal Statistical Society 1369–7412/16/79000 J. R. Statist. Soc. B (2016) Detection of change in the spatiotemporal mean function Oleksandr Gromenko, Tulane University, New Orleans, USA Piotr Kokoszka Colorado State University, Fort Collins, USA and Matthew Reimherr Pennsylvania State University, University Park, USA [Received December 2013. Final revision October 2015] Summary. The paper develops inferential methodology for detecting a change in the annual pattern of an environmental variable measured at fixed locations in a spatial region. Using a framework built on functional data analysis, we model observations as a collection of function- valued time sequences available at many sites. Each sequence is modelled as an annual mean function, which may change, plus a sequence of error functions, which are spatially correlated. The tests statistics extend the cumulative sum paradigm to this more complex setting. Their asymptotic distributions are not parameter free because of the spatial dependence but can be effectively approximated by Monte Carlo simulations. The new methodology is applied to precipitation data. Its finite sample performance is assessed by a simulation study. Keywords: Change point; Functional data; Mean function; Spatiotemporal data 1. Introduction Motivated by the problem of detecting a change in the annual pattern of a climatic variable over a spatial region, we develop change point detection methodology that is applicable to spatially indexed panels of functions. Climatic variables can be measured by using a variety of techniques and sources, but motivating the present work are data collected at a number of terrestrial observatories. These observatories often have the capacity to generate data at a very high temporal frequency. It is this mechanism which functional data analysis attempts to exploit: the data can be viewed as curves or functions, not just vectors of unrelated co-ordinates. For example, at any specific location, the record of 365 daily precipitation amounts is naturally viewed as a noisy curve with some underlying annual pattern. Data at many locations obtained over several decades form a collection of spatially dependent sequences. Owing to the annual periodicity, these time series are usually not stationary on small timescales but can be naturally viewed as stationary time series of annual functions. The present work thus views years as the fundamental statistical unit. We denote a measurement made in year n, at spatial location s S , Address for correspondence: Matthew Reimherr, Department of Statistics, Pennsylvania State University, 411 Thomas Building, University Park, PA 16802, USA. E-mail: [email protected]

Upload: others

Post on 06-Aug-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

© 2016 Royal Statistical Society 1369–7412/16/79000

J. R. Statist. Soc. B (2016)

Detection of change in the spatiotemporal meanfunction

Oleksandr Gromenko,

Tulane University, New Orleans, USA

Piotr Kokoszka

Colorado State University, Fort Collins, USA

and Matthew Reimherr

Pennsylvania State University, University Park, USA

[Received December 2013. Final revision October 2015]

Summary. The paper develops inferential methodology for detecting a change in the annualpattern of an environmental variable measured at fixed locations in a spatial region. Using aframework built on functional data analysis, we model observations as a collection of function-valued time sequences available at many sites. Each sequence is modelled as an annual meanfunction, which may change, plus a sequence of error functions, which are spatially correlated.The tests statistics extend the cumulative sum paradigm to this more complex setting. Theirasymptotic distributions are not parameter free because of the spatial dependence but canbe effectively approximated by Monte Carlo simulations. The new methodology is applied toprecipitation data. Its finite sample performance is assessed by a simulation study.

Keywords: Change point; Functional data; Mean function; Spatiotemporal data

1. Introduction

Motivated by the problem of detecting a change in the annual pattern of a climatic variableover a spatial region, we develop change point detection methodology that is applicable tospatially indexed panels of functions. Climatic variables can be measured by using a varietyof techniques and sources, but motivating the present work are data collected at a number ofterrestrial observatories. These observatories often have the capacity to generate data at a veryhigh temporal frequency. It is this mechanism which functional data analysis attempts to exploit:the data can be viewed as curves or functions, not just vectors of unrelated co-ordinates. Forexample, at any specific location, the record of 365 daily precipitation amounts is naturallyviewed as a noisy curve with some underlying annual pattern. Data at many locations obtainedover several decades form a collection of spatially dependent sequences. Owing to the annualperiodicity, these time series are usually not stationary on small timescales but can be naturallyviewed as stationary time series of annual functions. The present work thus views years as thefundamental statistical unit. We denote a measurement made in year n, at spatial location s∈S,

Address for correspondence: Matthew Reimherr, Department of Statistics, Pennsylvania State University, 411Thomas Building, University Park, PA 16802, USA.E-mail: [email protected]

Page 2: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

2 O. Gromenko, P. Kokoszka and M. Reimherr

and time (of year) t ∈T , as Xn.s, t/. The spatiotemporal field may have complicated and highlynon-stationary patterns, but, in indexing by n, we exploit the repetition of those patterns fromyear to year.

The goal of the present work is to develop statistical methods for inferring whether thepattern of a spatiotemporal process has changed over a specific time period, which is severaldecades for the data that motivated this research, e.g. the industrial revolution, the introductionof hybrid cars or international agreements which place restrictions on greenhouse gases. Sucha perspective motivates us to use a change point detection framework. An alternative andcomplementary approach is to consider trend detection and estimation. Change point analysishas been recognized as a useful paradigm, which continues to benefit from new approaches, e.g.Fryzlewicz (2014) and Cho and Fryzlewicz (2015). Developing change point tools for functionaldata has been undertaken only in the last few years; Horvath et al. (2010), Berkes et al. (2009),Hormann and Kokoszka (2010), Zhang et al. (2011) and Aston and Kirch (2012a,b). Severalchapters of Horvath and Kokoszka (2012) provide an account of this research.

At present, we are unaware of any research which has explored the change point problemfor spatially indexed functional data. Our methodology uses the proven cumulative sum ap-proach as a starting point. Although many competing methods are now available for scalardata, the fundamental idea of comparing the value of a parameter (the mean function in ourcase) before and after all potential change points remains attractive. In the absence of anychange point methodology for the data structure that we study, and because of the lack of aparametric model on which likelihood methods could be based, this seems to be a productiveapproach. The main challenge in this project turned out to be the estimation of the spatio-temporal structure of a functional random field in the presence of potential change pointsin the temporal mean structure. This problem can be approached from many directions; wepresent a solution which has worked best for the data that motivate this research. To estim-ate the spatiotemporal covariance structure, we exploit the replications (one per year) of thespatial error field. In this, our methodology differs from purely spatial analysis, where onlya single replication is available. The derivation of the tests statistics requires computation ofspatiotemporal moments. The practical implementation of the test relies on a new calibrationapproach which utilizes feasible approximations of these moments under the assumption ofGaussianity.

To illustrate the new methodology, we examine daily precipitation patterns at 59 locationsin 12 states in the midwestern USA, over the course of 60 years. Since we view each yearas a statistical unit, we have a sample size of N ≈ 60, with 59 spatial locations, and 365 timepoints. The dimension of the problem is, therefore, substantially larger than the sample size. Ourmethodology exploits the underlying periodic structure of data to make the problem tractable.Such a data structure is common to many weather, environmental and ecological data sets, andit is hoped that our methodology will find applications in these fields.

The remainder of the paper is organized as follows. Section 2 sets up the statistical frameworkby introducing the requisite concepts and assumptions. The test statistics and their asymp-totic distributions are presented in Section 3. Section 4 contains the details of the implemen-tation of the tests, which are further illustrated in Section 5 by application to midwest pre-cipitation data. In Section 5, we also study the finite sample properties of the tests. Proofsof the results of Section 3, technical calculations and details of the estimation of the covari-ance structure are collected respectively in Appendices A, B and C. Our methods are im-plemented in an R package, scpt, which, along with example code, is available to down-load from http://scpt.r-forge.r-project.org, or through R by using the commandinstall.packages("scpt",rep="http://R-Forge.R-project.org").

Page 3: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 3

2. Notation and assumptions

Let Xn.sk; ti/ be the observation of some environmental variable taken at the spatial location sk,in month or day ti of year n. We denote by K the number of spatial locations, by T the number ofobservations per year and by N the number of years that are available for the analysis. We treatthe whole record Xn.sk; ti/, 1 � i � T , as a single functional observation. To lighten notationand to reflect the functional perspective, we shall often drop the index t, so Xn.sk/ representsthe entire temporal record in year n and at location sk. The functional perspective reflects thefact that the values Xn.sk; t/ (temperature, pollution, etc.) exist at any time t. As with otherfunctional data analysis tools and procedures, we formulate our assumptions in term of thecomplete functions Xn.sk/.

Assumption 1. Each Xn is a random field over S ×T , where S is a compact subset of Rd andT is a compact subset of R. We assume that Xn ∈L2.S ×T / and that

E

[ ∫ ∫X2

n.s; t/ dtds]<∞:

Under assumption 1, Xn can be expressed as

Xn.s; t/=μn.s; t/+ "n.s; t/, .2:1/

where μn ∈ L2.S × T / is a deterministic mean function and "n ∈ L2.S × T / is a zero meanrandom-error term. Our goal is to test the null hypothesis that the sequences of mean functions{μn} are the same across n. If this hypothesis is true, the long-term annual pattern over a regiondoes not change. The random functions "n describe weather patterns which change from yearto year. The testing problem can thus be stated as

H0 :μ1 =: : :=μN versus HA :μ1 =: : :=μnÆ �=μnÆ+1 =: : :=μN ,

for some 1 <nÅ <N. (The equalities are in the L2.S ×T / sense.)The next two assumptions specify the dependence structure of the data.

Assumption 2. The errors "1, "2, : : : , "N are independent and identically distributed randomfields on S ×T .

In the case of a single series of scalar observations, assumption 2 would mean that we testfor a change point in mean, assuming that other aspects of the distribution, in particular thevariance, do not change. Such an assumption is quite common. If both mean and variance areallowed to change, the problem becomes much more difficult, even in the case of scalar normalobservations; see Horvath (1993).

Our next assumption postulates the separability of the spatiotemporal covariance. Through-out the paper, we use Kronecker’s delta function:

δnm ={

1 if n=m,0 if n �=m:

Assumption 3. The covariance function of Xn factors as

cov{Xn.sk; t/, Xm.sl; t′/}=E["n.sk; t/"m.sl; t′/]= δnm C.t, t′/σ.sk, sl/,

where C.t, t′/ and σ.sk, sl/ are respectively purely temporal and spatial covariances.

Although separability can be criticized as an excessively strong assumption (see for exampleStein (2005)), it is often found acceptable and useful in both theoretical and applied research;

Page 4: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

4 O. Gromenko, P. Kokoszka and M. Reimherr

see Haas (1995), Genton (2007), Hoff (2011) and Paul and Peng (2011). Also, separability playsa key role in modelling very large data sets since it significantly reduces the computational timethat is required for inverting space–time covariance matrices; Sun et al. (2012). In our setting,it also leads to asymptotic distributions which are functionals of standard Gaussian processesand so can be readily simulated.

Our implementation of the test procedure allows the variances to change between locationsbut assumes that the correlation function is stationary and isotropic. We do not state herestationarity and isotropy as explicit assumptions, as our methods are designed for a variety ofassumptions and techniques for estimating σ.·, ·/. This is discussed further in Appendix C.

Since C.t, t′/ and σ.sk, sl/ are determined up to only multiplicative constants, we impose theidentifiability condition ∫

TC.t, t/dt =1: .2:2/

By assumption 1, Xn.s/ ∈ L2.T / for almost all s ∈ S, so without any loss of generality weassume that each function Xn.s/ is an element of L2.T /. By the spectral theorem, the covariancefunction C admits the representation

C.t, t′/=∞∑

i=1λi vi.t/vi.t

′/,

where λ1 �λ2 �: : :�0 are the eigenvalues of C and the vi are the functional principal compo-nents; see for example chapter 2 of Horvath and Kokoszka (2012). Each function Xn.s/ admitsthe corresponding Karhunen–Loeve expansion

Xn.s; t/=μn.s; t/+∞∑

i=1ξni.s/vi.t/, .2:3/

where ξni.s/ are the scores defined by

ξni.s/=∫

{Xn.s; t/−μn.s; t/}vi.t/dt:

We make one last assumption for technical convenience. We discuss the estimation of thespatiotemporal covariance structure in Appendix C. However, large sample justification canbe derived for any estimators which are consistent. Assumption 4 refers to the K × K spatialcovariance matrix

Σ= [σ.sk, sl/, 1�k, l�K]:

Assumption 4. The estimators C and Σ are such that, as N →∞,∫ ∫{C.t, s/−C.t, s/}2 dt ds

P→0,

‖Σ−Σ‖ P→0:

Furthermore, assume that the eigenvalues of C are distinct: λ1 >λ2 >λ3 >: : :.

Assumption 4 is very weak as most estimators are root N consistent under mild conditions;see for example chapter 2 of Horvath and Kokoszka (2012). However, it allows us to establishthe asymptotic results of our testing procedure for a variety of estimators. The distinctness ofthe eigenvalues ensures that the empirical eigenvalues and eigenfunctions of C are consistent,and it is a common assumption in functional data analysis.

Page 5: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 5

3. Tests statistics and their asymptotic distribution

By assumptions 2 and 3, the vi and the λi do not depend on n or sk. Denote by vi and by λi

their estimates. To detect a change point, we propose the test statistics

Λ1 = 1N2

K∑k=1

w.k/p∑

i=1λ

−1i

N∑r=1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

, .3:1/

and

Λ2 = 1N2

K∑k=1

w.k/p∑

i=1

N∑r=1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

: .3:2/

In the case of a single location (K = 1; w.1/ = 1), statistic (3.1) reduces to the test statistic ofBerkes et al. (2009). In the spatial setting, we introduce the random weights w.k/ which reflectthe intuition that spatially close records contribute some redundant information and so shouldbe given smaller weights, whereas records at isolated locations contribute more informationand should be given larger weights. We allow the weights to be random to reflect that they areusually estimated from the data. Statistics Λ1 and Λ2 are weighted sums of Cramer–von Misestype of functionals of the functional cumulative sum process. Kolmogorov–Smirnov type ofstatistics can be defined analogously, but it is well known that such tests generally have poorfinite sample properties owing to the slow convergence of maximally selected statistics to thedouble-exponential distribution; see for example Horvath et al. (1999) and Bugni et al. (2009),among many other contributions. We therefore focus on the Cramer–von Mises type of statisticsΛ1 and Λ2. The selection of the weights is discussed at the end of this section. Observe that fora p which explains a large fraction of the variance

p∑i=1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

≈∥∥∥∥

r∑n=1

Xn.sk/− r

N

N∑n=1

Xn.sk/

∥∥∥∥2

,

by Parceval’s identity. Using this fact we introduce one more test statistic based directly on theL2-norm:

Λ∞2 = 1

N2

K∑k=1

w.k/N∑

r=1

∥∥∥∥r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/

∥∥∥∥2

: .3:3/

The inner products in Λ1 are normalized with the estimated variances of the scores λi, whichleads to an asymptotic distribution that is free of the λi. Only the largest p eigenvalues λi are usedso as not to inflate the variability. The asymptotic distribution of Λ

∞2 depends on the λi, but the

statistic does not require the selection of p. In the spatial setting, both limit distributions dependon the spatial covariances; unlike the limit in Berkes et al. (2009), none of them is parameterfree. The incorporation and estimation of the spatial covariance structure in the presence of apossible change point in the temporal functional structure has not been addressed in existingresearch.

The asymptotic null distributions of the test statistics are presented in theorem 1.

Theorem 1. Suppose that assumptions 1–4 hold. Furthermore, assume that the weights w.k/

are chosen such that w.k/ →P w.k/ where w.k/ are deterministic real-valued weights. Then,under hypothesis H0,

Λ1D→Λ1 =

K∑k=1

w.k/p∑

i=1

∫ 1

0B2

ik.x/dx, .3:4/

Page 6: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

6 O. Gromenko, P. Kokoszka and M. Reimherr

Λ2D→Λ2 =

K∑k=1

w.k/p∑

i=1λi

∫ 1

0B2

ik.x/dx, .3:5/

Λ∞2

D→Λ∞2 =

K∑k=1

w.k/∞∑

i=1λi

∫ 1

0B2

ik.x/dx, .3:6/

where Bik are Brownian bridges, independent across i. For each i, the vector of Brownianbridges Bi = .Bi1, : : : , BiK/T has covariance matrix Σ, i.e. Σ−1=2Bi is a vector of independentstandard Brownian bridges.

Theorem 2 describes the behaviour of the test statistics under the alternative of a single changepoint. Extensions to multiple change points or epidemic alternatives are possible but are moretechnical and are not pursued here. In the context of a single functional time series, the issuesthat are related to the behaviour under HA of similar test statistics have been well explained inAston and Kirch (2012a,b).

Theorem 2. Suppose that assumptions 1–4 hold. Furthermore, assume that the weightsw.k/ are chosen such that w.k/ →P w.k/ where w.k/ are deterministic real-valued weights.Abusing the notation slightly, let μnÆ = μ1, μnÆ+1 = μ2 and Δ = μ1 − μ2 �= 0. Under HA, ifnÅ=N →θ ∈ .0, 1/ and 〈Δ.sk/, vi〉 �=0 for some 1� i�p and 1�k �K, then

Λ1 =NK∑

k=1w.k/

p∑i=1

λ−1i 〈Δ.sk/, vi〉2 .1−θ/2θ2

3+oP.N/

P→∞

and

Λ2 =NK∑

k=1w.k/

p∑i=1

〈Δ.sk/, vi〉2 .1−θ/2θ2

3+oP.N/

P→∞,

with an analogous statement for Λ∞2 .

The proofs of theorems 1 and 2 are provided in Appendix A. If a change point has beendetected, its location can be estimated by

r =arg max1<r<N

K∑k=1

w.k/

∥∥∥∥r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/

∥∥∥∥2

: .3:7/

We have thus far assumed arbitrary weights w.k/. We shall now explore the choices that arein some sense optimal. In spatial statistics, the weights are typically selected to minimize theexpected squared distance to an unknown object of interest, be it the value at an unknownlocation or a parameter of the model. In a testing setting, the most natural approach is tominimize the variance of the test statistic under hypothesis H0. The asymptotic variances of thelimits in theorem 1 can be shown to be proportional to

wTΣ2w =K∑

k,l=1w.k/w.l/σ2.sk, sl/,

where

Σ2 = [σ2.sk, sl/, 1�k, l�N]: .3:8/

(Note that the entries of Σ are σ.sk, sl/ and those of Σ2 are their squares.) Using the method of

Page 7: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 7

Lagrange multipliers, it is not difficult to verify that the weights w minimizing wTΣ2w subjectto wT1=ΣK

k=1w.k/=1 are given by

w = .Σ2/−111T.Σ2/−11

: .3:9/

The estimation of the covariances σ.sk, sl/ is addressed in Appendix C.

4. Description of the test procedures

In this section, we provide algorithmic descriptions of the tests based on the asymptotic resultsof Section 3. An R implementation is available in the package scpt. To implement the tests,we must estimate the spatial covariance matrix Σ and the temporal eigenelements λi and vi.The latter can be calculated once an estimate C of the temporal covariance kernel C is available.There are several ways to compute Σ and C. The key difficulty is to obtain estimates which arevalid, at least approximately, under both H0 and HA. We explored several approaches and usedthe method that is described in Appendix C for the final analysis. It uses B-splines for estimatingσ.·, ·/, where we assume that, whereas the variance from location to location might be different,the correlation function is stationary and isotropic. This allows us to pool across locations toobtain a very good estimator.

We also performed many simulations aimed at comparing the performance of the tests basedon statistics Λ1, Λ2 and Λ

∞2 . The test based on Λ

∞2 (which does not require the selection of

the optimal number p of functional principal components) tends to overreject. If it does notdetect a change point, we can be fairly sure that there is none. If it does detect a change point,a more careful analysis based on the test statistics Λ1 or Λ2 which require a careful selection ofp (calibration) is recommended. We thus first describe the test based on Λ

∞2 , which does not

require calibration, and then proceed with the description of the calibration method.

Algorithm 1 (test based on the statistic Λ∞2 ).

Step 1: calculate the differenced series (C.1).Step 2: estimate the spatial covariances by using formulae (C.7)–(C.9) followed by parametricor non-parametric smoothing.Step 3: calculate the weights by using expressions (C.6) and (C.11).Step 4: rescale (if necessary) T to the unit interval [0, 1] and estimate the temporal covariancefunction by using expression (C.10).Step 5: calculate the eigenfunctions and the eigenvalues of the covariance function (C.10).Step 6: using the estimates that were obtained in the previous steps, calculate the Monte Carlodistribution of

ΛN2 =

K∑k=1

w.k/T∑

i=1λi

∫ 1

0B2

ik.x/dx:

For each i, Bi =Σ1=2

B0i , where B0

i = .B0i1, B0

i2, : : : , B0iK/T, and the B0

ik are independent standardBrownian bridges. The vectors B0

i are independent.Step 7: calculate the statistic Λ

∞2 given by equation (3.3). Find the P-value by using the Monte

Carlo distribution that was found in the previous step.

We now proceed with the description of the tests which adaptively choose the value of p

leading to the correct empirical size. They require that the scores are approximately multivariatenormal. Justification of expression (4.1) is based on lemma 1 in Appendix A.

Page 8: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

8 O. Gromenko, P. Kokoszka and M. Reimherr

Algorithm 2 (tests which employ calibration).

Step 1: perform steps 1–5 of algorithm 1.Step 2: conduct simulations to determine the optimal number of functional principal com-ponents as follows. For every 1�p�T , repeat the following steps R times.

(a) Generate artificial data according to

Xn.sk; t/=T∑

i=1

√λiξni.sk/vi.t/ 1�n�N, 1�k �K, .4:1/

whereξni ∼NK.0, Σ/ are independent vectors in an array indexed by .n, i/. All quantitieswith circumflexes are estimates obtained for the original data.

(b) Check whether Λi.p/ > qi.p, α/, i= 1, 2, where qi.p, α/ is the .1 −α/th quantile of theMonte Carlo distribution of Λi.p/; see expressions (3.4) and (3.5).

Step 3: find p for which the number of rejections in the previous step is closest to the nominallevel of significance α; denote this value by popt (which depends on i=1, 2 and α).Step 4: calculate the statistic Λ1.popt/ given by expression (3.1) or Λ2.popt/ given by expression(3.2). Find the P-value by using the Monte Carlo distribution of Λ1.popt/ or Λ2.popt/.

The calibration algorithm is computationally intensive. We need to generate the Monte Carlodistribution of Λi.p/, the right-hand sides in expression (3.4) and (3.5), for each value of p. Weused 104 replications to do it and we used R=104 as well. Algorithm 2 was applied in Section5 by using the Rcpp package; Eddelbuettel and Francois (2013). Using our R package for thisprocedure, the application took approximately 6 min on an Intel 2.6-GHz Quad core i7 centralprocessor unit. The procedure runs almost instantaneously on a smaller, simulated data set thatis included in the package.

The nominal level of significance is achieved only for the calibrated procedure without screen-ing with the test based on λ

∞2 . The power of the test depends slightly on the level of smoothing,

but the size of the calibrated test does not depend on it. In principle, the matrix in equation(3.9) may be close to singular. This has not happened in our simulations or data example. Pos-sible remedies include choosing a more restrictive parametric spatial covariance model and/orincreasing the size of the nugget.

5. Application to precipitation data

We illustrate the procedures that were described in Section 4 by applying them to historicalmidwest precipitation records. Our objective is not to perform a detailed climatological analysis,but rather to illustrate chief aspects of the statistical methodology.

The data have been obtained from the ‘Global historical climatological network database’,which is one of the main data sets used for climate monitoring. This data set represents com-piled high quality collections of main climate parameters such as daily maximum and minimumtemperature, amount of precipitation (liquid equivalent), amount of snowfall and snow depth.The data set, as well as extensive documentation, is available from the National Oceanic andAtmospheric Administration: ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/. The dataselected are daily precipitation records from midwest states Illinois, Indiana, Iowa, Kansas,Michigan, Minnesota, Missouri, Nebraska, North Dakota, Ohio, South Dakota and Wiscon-sin; Fig. 1. The number of stations is K =59, and the time interval is 1941–2000. The locationsand the time interval are selected on the basis of the availability of data. We use only recordswhich contain no more than 20 missing observations in a row and less then 5% of total missing

Page 9: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 9

Fig. 1. Locations of the 59 stations selected

observations. To remove the effects due to the heavy tail distribution, we apply the transforma-tion

Xn.s; t/= log10{Yn.s; t/+1},

where Yn.s; t/ are original records in tenths of a millimetre. After the transformation, we pres-mooth data by using the cubic splines function smooth.spline in R; Fig. 2. For our pre-cipitation data set and simulated data, the conclusions of the test were not affected by thispresmoothing step; they were the same for several degrees of smoothing which visually pre-served the general shape of the curves.

The application of the test of Gabrys and Kokoszka (2007) to residuals obtained by sub-tracting the sample mean functions before and after the estimated change point shows that thecurves Xn can be treated as independent. Time series plots of the scores of the residuals confirmthat the assumption of constant variance is reasonable.

Detection of a change point in the amount of precipitation has been recognized as an impor-tant problem in climatology and environmental science. Gallagher et al. (2012) have reviewed

Fig. 2. Transformed raw precipitation record for a single year n and a single location s ( ) and smoothedprecipitation Xn.sI t/ ( )

Page 10: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

10 O. Gromenko, P. Kokoszka and M. Reimherr

recent research and pointed out that the usual approach is to work with aggregated annual pre-cipitation, which results in one scalar data point per year. In our approach, we work with onefunction per year. We are concerned not only with a change in the total annual precipitation, butalso with a potential change in the timing of the precipitation, reflected in a change of the meanprecipitation pattern. Moreover, we are concerned with a change taking place over a region, notjust at a single location. Such a perspective can be relevant as shifts in a precipitation pattern overan agriculturally important region have profound economic consequences. We note that the an-nual curves X.sk/ that we consider are different from the Canadian precipitation curves that wereextensively used in Ramsay and Silverman (2005); we work with a time series of curves at eachlocation, whereas Ramsay and Silverman (2005) used one curve at every location, the averageover several decades. By construction, our approach has the maximum change point detectionresolution of 1 year; Gallagher et al. (2012) proposed a method for daily data at a single location.

The results of the application of the procedures described in Section 4 are presented in Tables1, 2 and 3. All tests lead to the same conclusion: one change point in the second half of the 1960s,though the test based on Λ1 is not quite significant at a 5% level. The pattern of the change isshown in Fig. 3. The biggest changes are in the area around Michigan Lake and south-west of thelake. To visualize the spatial distribution of change displayed in Fig. 3, we used the spatial field

φ.s/=‖μ1.s/− μ2.s/‖, .5:1/

Table 1. Results of the test described in algorithm 1

Iteration Segment Decision Λ∞2 P-value Estimated change

(years) point year

1 1941–2000 Reject 0:011719 0:0013 19662 1941–1965 Accept 0:010337 0:0987 —3 1966–2000 Accept 0:009997 0:1354 —

Table 2. Results of the test described in algorithm 2, based on statistics Λ1

Iteration Segment Decision Cumulative p P-value Estimated change(years) variance (%) point year

1 1941–2000 Accept 77.10 23 0.0606 19682 1941–1967 Accept 76.75 20 0.8931 —3 1968–2000 Accept 77.88 22 0.8747 —

Table 3. Results of the test described in algorithm 2, based on statistics Λ2

Iteration Segment Decision Cumulative p P-value Estimated change(years) variance (%) point year

1 1941–2000 Reject 85.01 28 0.0189 19682 1941–1967 Accept 86.00 28 0.8964 —3 1968–2000 Accept 85.44 27 0.8350 —

Page 11: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 11

Fig. 3. Spatial field showing the L2-distance between the mean log-precipitation before and after 1966:there is an increase in precipitation throughout the year in the area around location 4 and a decrease in thefirst half of the year in the area around location 1; locations close to 2 and 3 do not show a large change nora consistent pattern

where

μ1.s; t/= r−1r∑

n=1Xn.s; t/,

μ2.s; t/= .N − r/−1N∑

n=r+1Xn.s; t/:

We performed ordinary kriging with the exponential covariance model to obtain the heat mapthat is shown in Fig. 3. The application of our tests confirms that the heat map shows a statisti-cally significant change over a region, not a variation in the magnitude of change which may bedue to chance. Fig. 4 illustrates the fit of the model and the typical mean precipitation curvesbefore and after the change point. Our tests show that the spatially indexed vectors of the meanfunctions before and after around 1966 are different.

When the test of Berkes et al. (2009) is applied to records at individual locations, no changepoints are detected. If the curves are smoothed by using a penalty, change points at two locationsare detected but are not significant after a multiple-testing correction. Our test combines manyweak individual signals to detect a change over a region with enhanced power.

We now discuss some aspects of the implementation of the tests. The distribution of the scoresis normal to a reasonable approximation, which is a point that is exploited in the simulationstudy that is described in what follows. To take into account the curvature of the Earth we usechordal distance which is the three-dimensional Euclidean distance, so any covariance functionthat is valid in the three-dimensional Euclidean space remains valid in our application. Fig. 5shows the behaviour of the statistic T2.r/ that is defined by

T2.r/=K∑

k=1w.k/

∥∥∥∥r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/

∥∥∥∥2

, .5:2/

which is used to identify the change point via expression (3.7).

Page 12: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

12 O. Gromenko, P. Kokoszka and M. ReimherrX

n(s

;t)

0 100 200 300

0.0

0.5

1.0

1.5

Xn

(s;t)

0 100 200 300

0.0

0.5

1.0

1.5

(a) (b)

Fig. 4. Examples of functional observations and mean curves at a single location in southern Illinois( , functional observations Xn.tI s/; , curves modelled by using the mean and the functionalprincipal components; these curves practically overlap; pD60) ( , estimated sampled mean functions):(a) observation in 1942; (b) observation in 1999

1940 1950 1960 1970 1980 1990 2000

0.00

00.

005

0.01

00.

015

0.02

0

T2(

r)

Fig. 5. Function T2.r/ ( ), which is used to compute the test statistic Λ12 ( , estimated change point,

1966)

We conclude this section by reporting the results of a simulation study that was motivated byour data. We prefer to use a data-generating process which resembles real data rather than somegeneric Gaussian models because we would also like to validate our conclusions by a relevantsimulation study. To resemble the original precipitation data, we generated synthetic data byusing the model

Xn.sk; t/=T∑

i=1

√λiξni.sk/vi.t/ T =365, 1�n�60, 1�k �59,

where ξni ∼NK.0, Σ/, K =59, are independent vectors in an array indexed by .n, i/. All quan-tities with circumflexes are estimates obtained for the original precipitation data. The locationsare the same as for the precipitation records. We generated 104 replications, and for each repli-

Page 13: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 13

cation we applied the estimation procedures that were described in Section 4. The empiricalsizes for the test that is described in algorithm 1 are 1.5–2 times larger than the nominal size,depending on the length of the series N: for N = 60, this factor is about 1.5; for N = 30 itis about 2. For larger N, it becomes close to 1, but real precipitation records are not muchlonger that N = 60 years. For the methods that were described in algorithm 2, the empiricalsizes are practically equal to the nominal sizes, essentially by construction. Calibration of thetest based on the test statistic Λ1 leads to the value of p which corresponds to about 77% ofthe cumulative variance (CV). The CV methodology is standard in functional data analysisresearch; see for example Horvath and Kokoszka (2012), page 41. The test based on the teststatistic Λ2 requires 85% of the CV. This number is usually recommended in the functionaldata analysis literature. We emphasize that these percentages are obtained for our specific dataset and may be different for other data sets. The empirical sizes as a function of CV are pre-sented in Figs 6 and 7. The 95% pointwise confidence intervals are calculated by using thenormal approximation to the binomial proportion. These graphs show that the test based onΛ2 is more robust to the selection of CV, and the usual 85% rule works remarkably well forit.

To determine the empirical power, we generate data by using the model

Xn.sk; t/=

⎧⎪⎨⎪⎩

p∑i=1

√λiξni.sk/ vi.t/ n<nÅ,

η.sk; t/+p∑

i=1

√λiξni.sk/vi.t/ n�nÅ:

.5:3/

We report simulation results for a uniform shift η.s; t/ = a. We also tried several shapes andobtained very similar results. The empirical power, as a function of the parameter a, is shown inFig. 8 for the tests that are based on calibrated statistics Λ1 and Λ2. The test based on algorithm1 has higher power because the empirical size is inflated. Comparing the calibrated tests basedon Λ1 and Λ2, we see that the test based on Λ2 has uniformly higher power. Combined with itsrobustness to the selection of p, we conclude that the test based on Λ2 has better finite sampleproperties than the test based on Λ1, at least for the data that we considered. Regarding theestimation of the change point, if it exists, when the change point is close to N=2, its position isdetected very precisely, exactly for most replications. However, when nÅ is near the edges, theestimated position is usually shifted towards N=2. This phenomenon is well known in changepoint literature. In our case, this bias is about 2–3 years if the true change point is in the loweror upper quartile of the time interval. Our detected change point is close to the middle ofthe sample, so this shift does not affect the conclusion of a change in the second half of the1960s.

Our final comment relates to the robustness of the tests to the assumption of the separabilityof the spatiotemporal covariance function. We conducted a small simulation study in which theerrors "n.sk; t/ were generated to follow the non-separable covariance of Gneiting (2002):

C.h; t|β/= σ2

.a|t|2α +1/τexp

{− c‖h‖2γ

.a|t|2α +1/βγ

}.h; t/∈R2 ×R,

with σ2 = 1, a = 1, c = 20, α = 0:7, γ = 0:7 and τ = 2:5: The parameter β ∈ [0, 1] controls thestrength of the space–time interaction, with β =0 corresponding to separable covariances. Theother aspects of the spatiotemporal setting imitated the real precipitation data.

The calibrated methods based on algorithm 2 suffer from a small size distortion of about 1percentage point for β =0:5 and β =1. For β =0:5, the power increases monotonically with the

Page 14: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

14 O. Gromenko, P. Kokoszka and M. Reimherr

(a)

(b)

(c)

Fig

.6.

Est

imat

edem

piric

alsi

zeas

afu

nctio

nof

the

capt

ured

CV

for

the

test

base

don

Λ1:(

a)α

D0.0

1;(b

D0.0

5;(c

D0.1

Page 15: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 15

(a)

(b)

(c)

Fig

.7.

Est

imat

edem

piric

alsi

zeas

afu

nctio

nof

the

capt

ured

CV

for

the

test

base

don

Λ2:(

a)α

D0.0

1;(b

D0.0

5;(c

D0.1

Page 16: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

16 O. Gromenko, P. Kokoszka and M. Reimherr

(a)

(c)

(b)

Fig. 8. Empirical power for the shift as a function of parameter a for the tests based on Λ1 ( ) and Λ2( ) for three levels of significance (the horizontal lines): (a) αD0.01; (b) αD0.05; (c) αD0.01

size of the change and is comparable with that seen for separable covariances. However, for β =1,the largest admissible value of the space–time interaction, the power becomes unacceptablysmall. A conclusion of this experiment is that our method is robust to mild violations of theseparability assumption but may fail to detect a change point if the space–time interaction isvery strong.

Appendix A: Proofs of theorems 1 and 2

We begin with a simple lemma which specifies the covariances of the scores.

Page 17: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 17

Lemma 1. Under assumptions 1 and 3, E[ξni.sk/ξmj.sl/]= δnmδijλiσ.sk, sl/:

Proof. The covariances are given by

E[ξni.sk/ξmj.sl/]=E

[∫{Xn.sk; t/−μn.sk; t/}vi.t/dt

∫{Xm.sl; t′/−μm.sl; t′/}vj.t

′/dt′]

=∫ ∫

cov{Xn.sk; t/, Xm.sl; t′/}vi.t/vj.t′/dtdt′

= δnmσ.sk, sl/

∫ ∫C.t, t′/vi.t/vj.t

′/dtdt′

= δnmδijλi σ.sk, sl/:

A.1. Proof of theorem 1Asymptotic properties for Λ1 and Λ2 are proved in much the same fashion as in Berkes et al. (2009), andso we shall only outline the major details here. The properties for Λ

∞2 do not follow from previous results

and thus a complete proof is presented. The inclusion of random weights w.k/ is handled the same in allthree cases and thus we shall provide the details for the Λ

∞2 -setting only.

We begin with a reminder of the functional central limit theorem for our setting.

Theorem 3. Suppose that assumptions 1–3 hold. Then we have the functional limit theorem (withrespect to the Skorohod space DpK[0, 1])

N−1=2[Nx]∑n=1

vec

⎛⎜⎝

〈Xn.s1/−μn.s1/, v1〉 : : : 〈Xn.s1/−μn.s1/, vp〉:::

: : ::::

〈Xn.sK/−μn.sK/, v1〉 : : : 〈Xn.sK/−μn.sK/, vp〉

⎞⎟⎠ D→W.x/,

where W.x/ is a pK-dimensional vector of Brownian motions with covariance matrix diag.λ1, : : : , λp/⊗Σ, where Σ is the spatial covariance matrix with elements σ.sk, sl/.

The claim follows from the functional central limit theorem for random vectors. We simply need to checkthat the covariance matrix is correct. By assumption 4, the eigenelements can be consistently estimatedand thus theorem 3 holds with the estimated eigenfunctions as well. Now the asymptotic results for Λ1and Λ2 follow from the continuous mapping theorem.

We now need only to establish the desired results for Λ∞2 . By Parseval’s identity

Λ∞2 = 1

N2

K∑k=1

w.k/N∑

r=1

∥∥∥∥r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/

∥∥∥∥2

= 1N2

K∑k=1

w.k/N∑

r=1

∞∑i=1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

:

Now define

Λ2 = 1N2

K∑k=1

w.k/N∑

r=1

p∑i=1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

,

which is nearly the same as Λp

2 , but with the estimated eigenfunctions replaced by their population coun-terparts. Combining theorem 3, Slutsky’s lemma and the continuous mapping theorem we have Λ2 →D Λ2and, as p→∞, Λ2 →D Λ∞

2 : We shall then have that Λ∞2 →DΛ∞

2 if we can establish that, for any ε> 0,

limp→∞

lim supN→∞

P.|Λ∞2 − Λ2|� ε/=0; .A:1/

see Billingsley (1999) for details. Note that

|Λ∞2 − Λ2|�

K∑k=1

|w.k/| 1N2

N∑r=1

∞∑i=p+1

⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2

:

Page 18: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

18 O. Gromenko, P. Kokoszka and M. Reimherr

We then have that, for each k,

1N2

N∑r=1

∞∑i=p+1

E

[⟨r∑

n=1Xn.sk/− r

N

N∑n=1

Xn.sk/, vi

⟩2 ]

= 1N2

N∑r=1

∞∑i=p+1

λi σ.sk, sk/r

(1− r

N

)

=σ.sk, sk/

( ∞∑i=p+1

λi

)1

N2

N∑r=1

r

(1− r

N

)→0 as p→∞;

furthermore, this convergence happens uniformly in N. Since w.sk/→P w.sk/ and K is finite, it follows that

sup1�n�N;1�k�K

w.k/=OP .1/:

and we can therefore conclude that

P.|Λ∞2 − Λ2|� ε/→0, as p→∞,

and, since this convergence occurs uniformly in N, we have that theorem 1 holds.

A.2. Proof of theorem 2.We can express

r∑n=1

Xn − r

N

N∑n=1

Xn =r∑

n=1"n − r

N

N∑n=1

"n +r∑

n=1μn − r

N

N∑n=1

μn:

An application of Markov’s inequality gives

r∑n=1

"n − r

N

N∑n=1

"n =OP .N1=2/:

Examining the second term we have

r∑n=1

μn − r

N

N∑n=1

μn =⎧⎨⎩

rμ1 − r

N{nÅμ1 + .N −nÅ/μ2}, 1� r �nÅ,

nÅμ1 + .r −nÅ/μ2 − r

N{nÅμ1 + .N −nÅ/μ2}, nÅ <r �N:

Then we have, for 1� r �nÅ,

rμ1 − r

N{nÅμ1 + .N −nÅ/μ2}= N −nÅ

Nrμ1 − .N −nÅ/

Nrμ2

= N −nÅ

NrΔ,

and, for nÅ <r �N,

nÅμ1 + .r −nÅ/μ2 − r

N{nÅμ1 + .N −nÅ/μ2}nÅ = N − r

NnÅμ1 + .r −nÅ/N − r.N −nÅ/

Nμ2

= N − r

NnÅμ1 − N − r

NnÅμ2

= N − r

NnÅΔ:

If r = [Nx] then, as N →∞, r =Nx+O.1/. Combined with the assumption that nÅ=N =θ+o.1/, we haveN−1.N − nÅ/rΔ = N{.1 − θ/xΔ + o.1/}, and N−1.N − r/nÅΔ = N{θ.1 − x/Δ + o.1/}: Therefore, underthe alternative,

Λ1 =NK∑

k=1w.k/

p∑i=1

λ−1i

[〈Δ.sk/, vi〉2

{.1−θ/2

∫ θ

0x2 dx+θ2

∫ 1

θ

.1−x/2 dx

}]+oP .N/

Page 19: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 19

=NK∑

k=1w.k/

p∑i=1

λ−1i

[〈Δ.sk/, vi〉2

{.1−θ/2θ3

3+ θ2.1−θ/3

3

}]+oP .N/

=NK∑

k=1w.k/

p∑i=1

λ−1i

{〈Δ.sk/, vi〉2 .1−θ/2θ2

3

}+oP .N/:

By Slutsky’s lemma we can conclude that

Λ1 =NK∑

k=1w.k/

p∑i=1

λ−1i

{〈Δ.sk/, vi〉2 .1−θ/2θ2

3

}+oP .N/:

Similar arguments yield

Λ2 =NK∑

k=1w.k/‖Δ.sk/‖2 .1−θ/2θ2

3+oP .N/:

Appendix B: Integrated covariances

We derive approximations to integrated covariances that are used in Appendix C. We assume that theX.sk/ are Gaussian elements of L2.T /. We shall refer to the following two formulae:∫ ∫

cov{Ck.t, t′/, Cl.t, t′/}dt dt′ =σ2.sk, sl/2

N −1

∑λ2

i ; .B:1/

∫ ∫cov{C

.Z/

k .t, t′/, C.Z/

l .t, t′/}dt dt′ =σ2.sk, sl/2−3.N −2/

.N −1/2

∑λ2

i : .B:2/

We shall verify relationships (B.1) and (B.2). Let X.sk; t/= .X1.sk; t/, : : : , XN.sk; t//T and

A1 =1− I=N,

A2 =

⎛⎜⎜⎜⎜⎝

1 −1 0 · · · 0−1 2 −1 · · · 0

0 −1 2 · · · 0:::

::::::

: : ::::

0 0 0 · · · 1

⎞⎟⎟⎟⎟⎠,

where 1 = diag.1, : : : , 1/ and I is a matrix with all entries equal to 1s. Now, the classical estimator of thetemporal structure at location sk is

Ck.t, t′/= 1N −1

X.sk; t/TA1X.sk; t′/:

Then cov{Ck.t, t′/, Cl.t, t′/} can be expressed as a covariance of bilinear forms:

cov{Ck.t, t′/, Cl.t, t′/}= 1.N −1/2

cov{X.sk; t/TA1 X.sk; t′/, X.sl; t/TA1 X.sl; t′/}:

Next, applying standard results (see for example chapter 2, equation (58), in Searle (1971)), we obtain

cov{Ck.t, t′/, Cl.t, t′/}= 2.N −1/2

σ2.sk, sl/C2.t, t′/ tr.A1A1/

= 2N −1

σ2.sk, sl/C2.t, t′/:

After integration we obtain the final formula. Similarly,

C.Z/

k .t, t′/= 12.N −1/

X.sk; t/TA2 X.sk; t′/,

and thus

Page 20: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

20 O. Gromenko, P. Kokoszka and M. Reimherr

cov{C.Z/

k .t, t′/, C.Z/

l .t, t′/}= 12.N −1/2

σ2.sk, sl/C2.t, t′/ tr.A2A2/

= 2−3.N −1/

.N −1/2σ2.sk, sl/C2.t, t′/:

After integration we obtain the final formula.

Appendix C: Estimation of the covariance structure

There are several potentially useful methods of estimating the matrix Σ and the function C.·, ·/. Weexperimented with several of them and describe the one that worked best for the data that we considered:annual temperature and log-precipitation profiles over a region with an area of about 20% of the area ofthe USA.

To motivate the estimator of Σ that we propose, observe that, by assumption 3 and by equation (2.2),

σ.sk, sl/=σ.sk, sl/

∫C.t, t/dt =

∫C.t, t/σ.sk, sl/dt =E

[∫"n.sk; t/ "n.sl; t/dt

]:

By assumption 2, the integrals∫

"n.sk; t/ "n.sl; t/, 1�n�N, are independently and identically distributedreplications, so a method-of-moments estimator of σ.sk, sl/ would be N−1 ΣN

n=1

∫"n.sk; t/"n.sl; t/dt, where

the functions "n.sk/ are suitably defined residuals. These residuals must be computed by removing changepoints whose number or even existence is unknown. We experimented with several schemes but did notobtain satisfactory results. We therefore turned to estimators based on differencing. The justification ofthe consistency of the estimators that is proposed below relies on the assumption that there are only a fewchange points. In the derivations, we thus ignore the effect of a few possible change points. Simulationshave confirmed the validity of this approach.

Consider the differenced series

Zn.sk; t/=Xn+1.sk; t/−Xn.sk; t/ 1�n�N −1: .C:1/

By expression (2.1) (if n is not a change point),

Zn.sk; t/= "n+1.sk; t/− "n.sk; t/: .C:2/

This implies that the Zn are not independent; they form a 1-dependent, mean 0, stationary (in n) se-quence. Using equation (C.2) and assumption 3, we see that E[Zn.sk; t/Zn.sl, t/] = 2C.t, t/σ.sk, sl/: Since∫

C.t, t/dt =1, a preliminary estimator of σ.sk, sl/ is

12.N −1/

N−1∑n=1

∫Zn.sk; t/Zn.sl, t/dt: .C:3/

Estimator (C.3) is noisy and not necessarily positive definite. Following the usual practice, a parametriccovariance model can be used to obtain the final estimate σ.Z/.sk, sl/= Γ.‖sk − sl‖/, where Γ is a parametricspatial covariance function. Alternatively, Γ can be estimated non-parametrically as in Gromenko andKokoszka (2013), who extended the ideas of Hall et al. (1994) and Hall and Patil (1994) to the spatialsetting. We followed this non-parametric approach.

C.1. Temporal covarianceFor a fixed k,

C.Z/

k .t, t′/ := 12.N −1/

N−1∑n=1

Zn.sk; t/Zn.sk, t′/→C.t, t′/σ.sk, sk/ almost surely, .C:4/

so an estimator of C.t, t′/ can be obtained by calculating a weighted average of the C.Z/

k :

C.t, t′/=K∑

k=1w.k/C

.Z/

k .t, t′/K∑

k=1w.k/=1: .C:5/

Page 21: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

Detection of Change in the Spatiotemporal Mean Function 21

A natural way to find the weights is by minimizing

E

[∫ ∫ {C.t, t′/−

K∑k=1

w.k/C.Z/

k .t, t′/}2

dtdt′]

subject to ΣKk=1w.k/=1. Using the method of Lagrange multipliers, this is equivalent to solving the system

of K +1 linear equations

K∑k=1

w.k/

∫ ∫cov{C

.Z/

k .t, t′/, C.Z/

l .t, t′/}dt dt′ − r =0 l=1, : : : , K,K∑

k=1w.k/=1:

Setting

Ckl =∫ ∫

cov{C.Z/

k .t, t′/, C.Z/

l .t, t′/}dt dt′,

C= .Ckl, 1�k, l�K/,

the solution w= .w1, : : : , w.K//T is given by w=aC−11, where the constant a is chosen so that a1TC−11=1.The main difficulty lies in finding the integrated covariances Ckl. A usable formula can be derived assumingthat the functions X.sk/ are Gaussian. Formula (B.2) shows that Ckl = cσ2.sk, sl/, where c is a constant.The weights that we use are thus given by

w = .1TΣ2−1

1/−1Σ2−1

1, .C:6/

where Σ2 = .σ2.sk, sl/, 1�k, l�K/, and the σ.sk, sl/ are the final estimates of the spatial covariances. Notethat, under our simplifying assumptions, the weights w are estimates of the weights w that are givenby expression (3.9). Even though both sets of weights arise from different considerations, in the finalimplementation it is enough to use a single set of spatial weights.

C.2. Spatially dependent variancesWe have so far assumed stationarity and isotropy of the spatial covariance, i.e. we postulated that σ.sk, sl/=Γ.‖sk − sl‖/ depends only on the distance ‖sk − sl‖. This assumption can be relaxed by allowing differentvariability at each spatial location. Such an approach is motivated by the data set that we consider; thegraphs of the log-precipitation curves exhibit different variability at different locations. This is also theapproach that is implemented in the R package scpt and applied to all our data analyses. Specifically,we postulate a non-stationary covariance function of the form σNS.sk, sl/= c.sk/ c.sl/H.‖sk − sl‖/, whereH is a correlation function on the line. Since we work with the differenced series, we thus assume thatnon-stationary covariances are given by

σ.Z/NS .sk, sl/= c.Z/.sk/c.Z/.sl/H.Z/.‖sk − sl‖/: .C:7/

The method-of-moments estimator of c.Z/.s/ is

c.Z/.s/={

12.N −1/

N−1∑n=1

∫Z2

n.s; t/dt

}1=2

: .C:8/

The preliminary estimator of function H.Z/.·/ thus is

12.N −1/

1

c.Z/.sk/ c.Z/.sl/

N−1∑n=1

∫Zn.sk; t/Zn.sl; t/dt: .C:9/

Estimator (C.9) is noisy and not necessarily positive definite. Denote the final estimator that is obtainedby a parametric model fit by H

.Z/.‖sk − sl‖/.

The temporal covariances C.t, t′/ are estimated by

C.Z/

.t, t′/=K∑

k=1w.k/C

.Z/

k .t, t′/, .C:10/

Page 22: Detection of change in the spatiotemporal mean functionpiotr/rain.pdf · 2016. 8. 10. · Detection of Change in the Spatiotemporal Mean Function 3 2. Notation and assumptions Let

22 O. Gromenko, P. Kokoszka and M. Reimherr

where C.Z/

k .t, t′/ is given by expression (C.1) and the weights w.k/ are given by equation (C.6) with

Σ2 = .σ.Z/NS.sk, sl/

2, 1�k, l�N/: .C:11/

The covariance function (C.10) is represented numerically as a T × T matrix, so we can compute themaximum of T eigenvalues and eigenfunctions. In the case of the precipitation data that were used inSection 5, we obtain 365 eigenvalues.

References

Aston, J. A. D. and Kirch, C. (2012a) Detecting and estimating epidemic changes in dependent functional data.J. Multiv. Anal., 109, 204–220.

Aston, J. A. D. and Kirch, C. (2012b) Evaluating stationarity via change-point alternatives with applications tofMRI data. Ann. Appl. Statist., 6, 1906–1948.

Berkes, I., Gabrys, R., Horvath, L. and Kokoszka, P. (2009) Detecting changes in the mean of functional obser-vations. J. R. Statist. Soc. B, 71, 927–946.

Billingsley, P. (1999) Convergence of Probability Measures, 2nd edn. New York: Wiley.Bugni, F. A., Hall, P., Horowitz, J. L. and Neuman, G. R. (2009) Goodness-of-fit tests for functional data.

Econmetr. J., 12, 1–18.Cho, H. and Fryzlewicz, P. (2015) Multiple-change-point detection for high dimensional time series via sparsified

binary segmentation. J. R. Statist. Soc. B, 77, 475–507.Eddelbuettel, D. and Francois, R. (2011) Seamless R and C++ Integration with Rcpp. New York: Springer.Fryzlewicz, P. (2014) Wild binary segmentation for multiple change-point detection. Ann. Statist., 42, 2243–2281.Gabrys, R. and Kokoszka, P. (2007) Portmanteau test of independence for functional observations. J. Am. Statist.

Ass., 102, 1338–1348.Gallagher, C., Lund, R. and Robbins, M. (2012) Changepoint detection in daily precipitation-data. Environmetrics,

23, 407–419.Genton, M. G. (2007) Separable approximations of space-time covariance matrices. Environmetrics, 18, 681–695.Gneiting, T. (2002) Nonseparable, stationary covariance functions for space–time data. J. Am. Statist. Ass., 97,

590–600.Gromenko, O. and Kokoszka, P. (2013) Nonparametric inference in small data sets of spatially indexed curves

with application to ionospheric trend determination. Computnl Statist. Data Anal., 59, 82–94.Haas, T. C. (1995) Local prediction of a spatio-temporal process with an application to wet sulfate deposition. J.

Am. Statist. Ass., 90, 1189–1199.Hall, P., Fisher, N. I. and Hoffmann, B. (1994) On the nonparametric estimation of covariance functions. Ann.

Statist., 22, 2115–2134.Hall, P. and Patil, P. (1994) Properties of nonparametric estimators of autocovariance for stationary random fields.

Probab. Theor. Reltd Flds, 99, 399–424.Hoff, P. D. (2011) Separable covariance arrays via the Tucker product, with applications to multivariate relational

data. Baysn Anal., 6, 179–196.Hormann, S. and Kokoszka, P. (2010) Weakly dependent functional data. Ann. Statist., 38, 1845–1884.Horvath, L. (1993) The maximum likelihood method for testing changes in the parameters of normal observations.

Ann. Statist., 21, 671–680.Horvath, L., Huskova, M. and Kokoszka, P. (2010) Testing the stability of the functional autoregressive process.

J. Multiv. Anal., 101, 352–367.Horvath, L. and Kokoszka, P. (2012) Inference for Functional Data with Applications. New York: Springer.Horvath, L., Kokoszka, P. S. and Steinebach, J. (1999) Testing for changes in multivariate dependent observations

with applications to temperature changes. J. Multiv. Anal., 68, 96–119.Paul, D. and Peng, J. (2011) Principal components analysis for sparsely observed correlated functional data using

a kernel smoothing approach. Electron. J. Statist., 5, 1960–2003.Ramsay, J. O. and Silverman, B. W. (2005) Functional Data Analysis. New York: Springer.Searle, S. R. (1971) Linear Models. New York: Wiley.Stein, M. L. (2005) Space–time covariance functions. J. Am. Statist. Ass., 100, 310–321.Sun, Y., Li, B. and Genton, M. G. (2012) Geostatistics for large datasets. In Advances and Challenges in Space-time

Modelling of Natural Events (eds E. Porcu, J. M. Montero and M. Schlather), ch. 3, pp. 55–77. Berlin: Springer.Zhang, X., Shao, X., Hayhoe, K. and Wuebbles, D. J. (2011) Testing the structural stability of temporally dependent

functional observations and application to climate projections. Electron. J. Statist., 5, 1765–1796.