A comparison of tests for the one-way ANOVA problem for functional data

In this paper, some new tests based on the idea of the B-spline test (Shen and Faraway in Stat Sin 14:1239–1257, 2004) for the one-way ANOVA problem for functional data are proposed. Eleven existing tests for this problem are also reviewed. Exhaustive simulation studies are presented to compare all of the tests considered. The simulations are based on real labeled times series data and artificial data. They provide an idea of the size control and power of the tests, and emphasize the differences between them. Illustrative examples of the use of the tests in practice are also given.

against the alternative that its negation holds. This problem is known as the k-sample testing problem or the one-way ANOVA problem for functional data. As we will see, some of the tests considered in this paper can also be used in the general "heteroscedastic" case, where the covariance functions in groups are not necessarily equal. Quite a few tests for the aforementioned problem are given in the literature. Some of these tests have been used in many practical experiments in chemometrics (Bobelyn et al. 2010;Tarrío-Saavedra et al. 2011), economics (Long et al. 2012), transport emissions (Gao 2007), etc. Most of these tests are described briefly in Sect. 2, where we also propose new tests. The tests differ in terms of size control and power. To compare the tests, we present exhaustive simulation studies whose results may help in choosing the best test for a specific real problem.
The rest of the paper is organized as follows. In Sect. 2, the existing tests for the one-way ANOVA problem for functional data are reviewed and new tests for that problem are presented. Simulation studies and illustrative examples are presented in Sects. 3 and 4, respectively. Some conclusions are given in Sect. 5. Supplementary Materials are described in Sect. 6. Proofs of the theoretical results are outlined in the "Appendix".

Tests for the one-way ANOVA problem for functional data
In this section, we describe existing tests for the one-way ANOVA problem for functional data and present new tests based on the idea of the B-spline test (Shen and Faraway 2004).

Existing tests
We first set up notation. Let denote the pointwise between-subject and within-subject variations respectively, whereX i = 1, . . . , k, are respectively the sample grand mean function and the sample group mean functions. Moreover, let tr(γ ) = T γ (t, t)dt denote the trace of γ (s, t). The pooled sample covariance functionγ (s, t), as an unbiased estimator of γ (s, t), is given byγ The natural extension of the classical ANOVA F-test for real variables to the context of functional data analysis is the pointwise F-test proposed by Ramsay and Silverman (2005, p. 227). The test statistic of the pointwise F-test for (1) is defined as The pointwise F-test rejects (1) at each t ∈ T whenever F n (t) > F k−1,n−k (1 − α) for any predetermined significant level α, where F k−1,n−k (1 − α) denotes the upper 100(1 − α) percentile of F k−1,n−k . Hence we can test (1) at all points of T using the same critical value for any predetermined significant level. Unfortunately, the pointwise F-test is time-consuming (it must be performed for all t ∈ T ) and it is not guaranteed that the one-way ANOVA problem (1) is significant overall for a given significance level even when the pointwise F-test is significant for all t ∈ T at the same significance level. In the literature, global tests which overcome this difficulty are also proposed. We briefly describe them below. Cuevas et al. (2004) proposed to use the following test statistic for testing (1) Under the null hypothesis (1) and the assumptions that n i , n → ∞ in such a way that n i /n → p i > 0 for i = 1, . . . , k, they proved that the approximate distribution of V n is that of the statistic where Z 1 (t), . . . , Z k (t) are independent Gaussian processes with mean 0 and covariance function γ (s, t). Cuevas et al. (2004) computed the p-value of V n , or its empirical critical value, by resampling Z i (t), i = 1, . . . , k, from Gaussian processes GP(0,γ ), whereγ (s, t) is given by (2), a large number of times. This test will be referred to as the CH test. They also showed that the test statistic V n can be used for testing (1) in the "heteroscedastic" case. In this case, the p-value of V n can be computed as above, but here Z 1 (t), . . . , Z k (t) are independent Gaussian processes with covariance functionŝ This version of the test of Cuevas et al. (2004) will be referred to as the CS test.
The F-type test (Shen and Faraway 2004; Zhang 2011) adopted for (1) uses the test statistic .
Under the null hypothesis (1), we can show that F n ∼ F d 1 ,d 2 approximately, where d 1 is the same as for the L 2 -norm-based test given earlier and d 2 = (n − k)κ. Similarly, the approximate null distribution of the F-type test can be used to compute the pvalue of F n or its critical value. The parameter κ can be estimated by the naive method or by the bias-reduced method described above. Hence we consider the F-type test with the naive estimation method for the parameter κ (the FN test for short), and the F-type test with the bias-reduced estimation method for the parameter κ (the FB test for short). Further details about the aforementioned L 2 -norm-based and F-type tests for one-way ANOVA for functional data can be found in Zhang (2013, ch. 5).
When the k samples are not Gaussian and when the sample sizes are small, the L 2 -norm-based test and the F-type test are not preferred (see Zhang 2013). In this case, the bootstrap versions of these tests can be used to bootstrap the p-values of S n and F n (see Zhang 2013, p. 159, for more details). To shorten the notation, we refer to the L 2 -norm-based bootstrap test and F-type bootstrap test as the L 2 b test and Fb test, respectively.
Globalization of the pointwise F-test (the GPF test, Zhang and Liang 2014) uses the test statistic T n = T F n (t)dt. Under the null hypothesis (1), it can be shown that whereγ (s, t) is given by (2). This approximate distribution can be used to compute the p-value of T n or its critical value in much the same way as for the L 2 -norm-based test. Fan and Lin (1998) proposed to use adaptive Neyman test to compare different sets of curves. This test can be adopted for testing (1) (see, for example, Laukaitis and Račkauskas 2005, which used it in the analysis for clients segmentation tasks). Let X * i j (l), l = 1, . . . , T * be the discrete Fourier tranform of the function X i j for given i and j. We assume the model X To test H * 0 , Fan and Lin (1998) propose to use the test statistic As it is discussed in Fan and Lin (1998), the choice of the maximum number of dimensions T * does not alter the result very much, as long as T * is large enough so that high-frequency cells are basically noise. We reject H * 0 when T HANOVA is too large. The critical values for this test statistic can be obtained by the finite sample distribution of it (see Table 1 in Fan and Lin 1998). We refer to this test as the FL test.

Tests based on a basis function representation
In this section, we present tests for the one-way ANOVA problem which are based on a basis function representation of the stochastic processes (X i j (t), t ∈ T ). These tests are inspired by the idea of the B-spline method of Shen and Faraway (2004).
Assume that we observe k groups of stochastic processes X i j ∈ L 2 (T ), i = 1, . . . , k, j = 1, . . . , n i , where L 2 (T ) is the Hilbert space of square integrable functions on the interval T , equipped with the inner product < f, g> = T f (t)g(t)dt. Let {φ l } be an orthonormal basis of L 2 (T ). This orthonormal basis also called basis function system has the property that we can approximate arbitrarily well any function by taking a weighted sum or linear combination of a sufficiently large number K of these functions (see Ramsay and Silverman 2005). For this reason, we consider the case where the stochastic processes (X i j (t), t ∈ T ) can be represented by a finite number of orthonormal basis functions, i.e.
where c i jl , l = 0, 1, . . . , K , are random variables with finite variance and K is sufficiently large. We present how we can choose the appropriate value of K based on the data later on. We write φ(t) = (φ 0 (t), φ 1 (t), . . . , φ K (t)) and c i j = (c i j0 , c i j1 , . . . , c i j K ) . The stochastic processes (X i j (t), t ∈ T ), the sample grand mean function and the sample group mean functions can be written in matrix notation as follows: for t ∈ T . The vectors c i j can be estimated by the least squares method, and the optimum value of K in the sense of smoothness can be selected for each process (X i j (t), t ∈ T ) using the Bayesian Information Criterion (BIC); then from the values of K corresponding to all processes a modal value is selected as the common value for all (X i j (t), t ∈ T ), i = 1, . . . , k, j = 1, . . . , n i (see Krzyśko and Waszak 2013;Górecki et al. 2014, for more details). We should prefer K to be large, particularly when the stochastic processes (X i j (t), t ∈ T ) are observed at high frequency with little noise.
We reduce the stochastic processes (X i j (t), t ∈ T ) to vectors c i j of length K + 1, for all i = 1, . . . , k, j = 1, . . . , n i . Of course, the score vectors c i j contain some information about these processes. The B-spline method in Shen and Faraway (2004) for testing hypotheses for functional data uses this information in the following simple way: We represent each stochastic process as a linear combination of orthonormal basis functions and then perform the usual multivariate test on the coefficients of this representation. Based on this idea, the usual MANOVA tests on the vectors c i j can be performed to test (1). The well-known MANOVA tests are Wilk's lambda (which is a function of the likelihood ratio test statistic), the Lawley-Hotelling trace, the Pillai trace, and Roy's maximum root (Anderson 2003). Therefore, we have four tests for the one-way ANOVA problem for functional data, and we call these the W, LH, P and R tests, from the initial letters of the surnames of their originators.
The aforementioned tests for the one-way ANOVA problem for functional data are very simple, but we will see that they do not perform so well as the other methods in some cases. Moreover, from the formal requirements of the MANOVA tests, we usually have to reduce the number of basis functions in (4), which can negatively affect the smoothness of a basis functional representation of the processes (X i j (t), t ∈ T ). However, a basis function representation can be used to construct a better test for (1). The test statistic of the classical ANOVA F-test for real variables adopted for functional data takes the form where || f || 2 2 = T f 2 (t)dt for f ∈ L 2 (T ). In the following proposition, a more useful form of this statistic is proved.
Proposition 1 Assume that the stochastic processes X i j ∈ L 2 (T ), i = 1, . . . , k, j = 1, . . . , n i , are represented by a finite number of orthonormal basis functions, i.e. the equations in (5) hold with a known (fixed) K . Then the statistic F given by (6) is equal to The proof of Proposition 1 is given in the "Appendix". We propose to use F as the test statistic and a permutation-based p-value for testing (1). Proposition 1 implies that the statistic F given by (6) is a function of the coefficient vectors c i j and does not depend on the functions φ l . Moreover, it is easy to see that any permutation of the stochastic processes (X i j (t), t ∈ T ) leaves the values of the sums b and c unchanged. Hence for each random permutation of the data only the sum a has to be calculated. Furthermore, the sums a, b and c given in Proposition 1 can be expressed in the forms presented in the following lemma, which are easier and faster to compute, using computer programs such as R, than the sums given in Proposition 1.

Lemma 1 Let
where 1 p is the p × 1 vector of ones.
The proof of Lemma 1 is outlined in the "Appendix". The permutation test based on the test statistic F and implemented with the use of the above facts is comparable in terms of speed to the bootstrap tests described in Sect. 2.1. Moreover, as we will see later, this test is comparable in terms of size control and power to other tests for (1), and it performs better than those tests when the number of observations and number of time points are small. We also remark that it is easy to see that F = F n , where F n is the test statistic of the F-type test described in Sect. 2.1. However, from the simulations in Sect. 3, we find that the above permutation test based on the test statistic F (the FP test for short) performs better than the F-type tests based on approximation of the distribution of this test statistic, and also better than the Fb test.

Numerical implementation of the tests
In practice, the k functional samples are not continuously observed. Each function is usually observed on a grid of design time points. In this paper, all individual functions in the simulations and the examples are observed on a common grid of design time points. All tests can be directly applied to such functional data. In the Supplementary Materials, we present and describe the R codes which perform all of the global tests considered in this paper. However, the design time points may in some situations be different for different individual functions. To implement the tests numerically for such situations, one first has to reconstruct the k functional samples from the k observed discrete functional samples using some smoothing technique, then discretize each individual function of the k reconstructed functional samples on a common grid of time points, and finally apply the tests accordingly (see Zhang 2013, or Zhang and Liang 2014, for more details). In all simulations and examples given in this paper, the p-values of the FP test were obtained on the basis of 1,000 permutation replicates, the p-values of the CH and CS tests were evaluated on the basis of 2,000 discretized artificial trajectories for each process Z i (t) appearing in the limit statistic V given in (3), and the p-values of the L 2 b and Fb tests were obtained on the basis of 10,000 bootstrap replicates. The orthonormal basis functions chosen in performing the FP, LH, R, P and W tests are the Fourier system (see Krzyśko and Waszak 2013). The optimal values of K as given in (4) were selected using the BIC from the set K = {3, 5, . . . , 101} in the case of the FP test. For the LH, R, P and W tests, we usually selected the optimal values of K from a subset of that set whose elements enable the performance of the MANOVA tests. The set K is associated with the function in the R program which creates the Fourier system. The critical values for the FL test statistic (0.05 upper quantiles of the distribution of T HANOVA ) were obtained by the finite sample distribution of it based on one million simulations (see Table 1 in the Supplementary Materials). The R code of the program, which generates these critical values is also given there. The maximum number of dimensions T * in T HANOVA is chosen in the following way: Suppose that the number of design time points on which the functions are observed is T . If T < 100, T ∈ [100, 200], T > 200, then T * = T , T * = T /2 , T * = 100, respectively.

Simulation studies
In this section we present some simulation studies which serve to compare the tests for the one-way ANOVA problem for functional data. The simulation studies are based on real labeled times series data, which are in fact discrete functional data. They are labeled, which means that the assignment of the observations to groups is known. They also consist of real data. Additional simulation studies based on artificial data are also given.

Experimental setup
We use the labeled time series data to generate k = 3 discrete functional samples with n 1 = n 2 = n 3 =n = 10, 20, 30. Information on the time series used is given in Assume that the classes of the data sets are numbered from 1 to l. Of course, the number of classes l depends on the data set (see Table 1). For each data set described in Table 1 except data sets where there is not a sufficient number of observations, the k = 3 functional samples are generated to compare the empirical sizes of the tests for (1) in the following way: (1) select randomly one element i from the set {1, . . . , l}; (2) from the ith class, select randomly 3n observations and create from them three samples, each of sizen. For such samples, we expect to accept the null hypothesis (1). For each data set, we generate 100 such samples. For each of them, the p-values provided by all considered tests for (1) were noted. The rates of rejection of the null hypothesis (1) at the significance level α = 0.05 for all tests are given in Table 2 and  Tables 2 and 3 in the Supplementary Materials. This simulation will be referred to as S1.
For each data set described in Table 1 except data sets where there is not a sufficient number of observations, the k = 3 functional samples are generated to compare the empirical powers of the tests for (1) in the following way: (1) select randomly two different elements i and j from the set {1, . . . , l}; (2) from the ith class, select randomly 2n observations and create from them two samples, each of sizen; (3) from the jth class, select randomlyn observations to create the third sample. For the samples generated in this way we expect to reject the null hypothesis (1). The rates of rejection of the null hypothesis (1) at the significance level α = 0.05 are given in Table 3 and Tables 4 and 5 in the Supplementary Materials. This simulation will be called S2.
The aforementioned simulations are based on time series whose lengths are mainly moderate or large. We also give additional simulation studies to present the differences between empirical sizes and powers of the tests for the one-way ANOVA problem for "short" functional data. Similarly to Cuevas et al. (2004), we considered an artificial example with [a, b] = [0, 1] and k = 3 groups in seven cases: For each pair (Mi, σ j ), i, j = 1, . . . , 7 in both cases, the fifteen tests were applied to the three generated functional samples. Their p-values were then recorded. When the p-values are smaller than the nominal significance level α = 0.05, the null hypothesis (1) is rejected. The aforementioned process was repeated N = 100 times. For each case, the empirical sizes or powers of the tests were then computed as the proportional number of rejections (out of N = 100 replications) based on the calculated p-value (see Tables 6-17 in the Supplementary Materials).

Results
It is not easy to draw conclusions about the behavior of all of the tests for (1) being compared by means of the simulations given in Sect. 3.1. For this reason, we present a detailed statistical comparison to identify differences between the tests in Sect. 3.3. In this section, we restrict ourselves to providing simple and immediate insights obtained from Tables 2, 3 and Tables 2-17 in the Supplementary Materials. In simulation S1 and in models M1 and M2 (where H 0 is true) all tests except the R and FL tests provide satisfactory results in almost all of the cases considered. From Table 2 and Tables 2, 3, 6-8, 12-14 in the Supplementary Materials, we immediately observe that the R and FL tests are the most liberal of all the tests, with empirical sizes ranging between 10 and 46 %, 4 and 46 % respectively. Hence it seems that the significance levels of the R and FL tests are not less than or equal to 5%. However, it also seems that with increasing sample sizes, the empirical sizes of the FL test generally decrease, but we can not say the same for the R test. The other tests perform much better than the R and FL tests. In simulation S1, the L 2 B, FB, L 2 N, FP and GPF tests are slightly more liberal than all of the remaining tests except the R and FL tests. The Fb test is the most conservative. In models M1 and M2 in the normal case, the LH, W, P, L 2 B, FP and FB tests are slightly more liberal than the GPF and L 2 N tests, and the CH, CS, L 2 b, FN and Fb tests are the most conservative. In models M1 and M2 in the Wiener case, the L 2 B, GPF, L 2 N, CS and L 2 b tests are slightly more liberal than the other tests, and the P, CH and Fb tests are usually the most conservative (the LH and W tests are also conservative when n i = 30, i = 1, 2, 3).
Information about the empirical powers of the tests is obtained from simulation S2 and models M3-M7 (see Table 3; Tables 4, 5 , 9-11, 15-17 in the Supplementary Materials). The R and FL tests seem to be ones of the most powerful tests, but this may be connected with the unacceptable high empirical sizes of those tests. In simulation S2, the GPF, FP, L 2 B and FB tests have slightly higher powers than the L 2 N, L 2 b and FN tests, and these all have higher powers than the other tests. The P test has the smallest empirical power. In models M3-M7 in the normal case, the FP, L 2 B and FB tests have the highest powers. The remaining tests have smaller powers than those tests, and the Fb and P tests have the smallest empirical powers. In models M3-M6 in the Wiener case, the situation is changing. Here, LH, W, P (for n i = 20, 30, i = 1, 2, 3) and GPF tests are the most powerful tests. Nevertheless, the Fb test has still the smallest empirical power.
With increasing sample sizes, the empirical sizes of the tests generally become better or are at the same level in terms of size control, and the empirical powers of the tests generally increase.
The powers of the tests for (1) depend strongly on the error parameters. With an increase in the dispersion parameter, the empirical powers of the tests generally become smaller. All of the tests (except eventually the P test in the normal case or when n i = 10, i = 1, 2, 3) perform very well for σ 1 and well for σ 2 and σ 3 . However, for σ i , i = 5, 6, 7, the CH, CS, L 2 N, L 2 b, FN and Fb tests in each case and the FP, L 2 B and FB tests in the Wiener case often perform badly or even very badly. All tests depend on the dispersion parameter, but some of them to a much greater degree than others.
In model M7 the functions are in fact constant, so this model is an example in which the functional approach is unnecessarily complicated. We include this case to compare the functional tests with the classical ANOVA F-test for real variables, which would be more appropriate here. In model M7, the classical ANOVA F-test gives 97 % rejections of the null hypothesis (1) at a significance level α = 0.05 for σ 7 and n i = 10, i = 1, 2, 3, and 100 % rejections in all other cases. Although the functional tests perform generally worse than the classical ANOVA F-test for real variables, most of them (especially the FP, L 2 B and FB tests) perform quite well for small and moderate values of the dispersion parameter.
We can also observe that in simulation S2 and models M3-M7 in the normal case the CH test performs slightly better than the CS test. The reason for this is perhaps that the homoscedastic assumption appears reasonable for those simulation data. The opposite situation holds in models M3-M6 in the Wiener case.

Statistical comparison of tests
To identify differences between the tests, we present a detailed statistical comparison. We test the null hypothesis that all tests perform the same and the observed differences are merely random. We used the Iman and Davenport (1980) test, which is a nonparametric equivalent of ANOVA. The F-test is recommended because it is less conservative than other tests (Looney 1998;Demšar 2006). We perform this test separately for the results of the simulation S1, the simulation S2, the models M1 and M2 in each case, the models M3-M7 in the normal case, the models M3-M6 in the Wiener case, and separately for n i = 10, 20, 30, i = 1, 2, 3 in each of these simulation scenarios. The F-test ranks the tests for each data set or pair (Ms, σ t ), s, t = 1, . . . , 7, separately, the tests with the smallest rates of rejection of the null hypothesis receiving a rank of 1, the tests with the second smallest rates of rejection a rank of 2, and so on (in case of ties average ranks are assigned). Let R i j be the rank of the jth of K tests on the ith of N data sets or pairs (Ms, σ t ), and R j = 1 N N i=1 R i j . The test compares the mean ranks of methods and is based on the statistic is the Friedman statistic, which has the F distribution with K − 1 and (K − 1)(N − 1) degrees of freedom. The p-values from this test are less than 2.2E−16 for all simulation scenarios described in Sect. 3.1 except simulations S1 with n i = 30, i = 1, 2, 3 (pvalue = 3.005E−10) and S2 with n i = 20, 30, i = 1, 2, 3 (p-value = 3.281E−12, 9.721E−06 respectively). We can therefore proceed with the post hoc tests to detect significant pairwise differences among all of the tests. A set of pairwise comparisons can be associated with a set of hypotheses. Any of the post hoc tests which can be applied to non-parametric tests work over a family of hypotheses. The test statistic for comparing the ith and jth tests is This statistic is asymptotically normal with zero mean and unit variance. When comparing multiple algorithms, to retain an overall significance level α, one has to adjust the value of α for each post hoc comparison. There are various methods for this. A simple method is to use Bonferroni correction. There are m = K (K − 1)/2 comparisons, therefore Bonferroni correction sets the significance level of each comparison to α/m. Demšar (2006) recommends the procedure of Nemenyi (1963), which is based on this correction. The Nemenyi test is similar to the Tukey test for ANOVA and is used when all tests are compared with each other. The performance of two tests is significantly different at the experimentwise error rate α if i = 1, . . . , K − 1, j = i + 1, . . . , K , where the values of q(α, K , ∞) are based on the Studentized range statistic (Hollander and Wolfe 1973;Demšar 2006). The results of multiple comparisons are given in Table 4 and Tables 18 and 19 in the Supplementary Materials. Those tests that are connected by a sequence of letters have average ranks that are not significantly different from one another. For example, when n i = 10, i = 1, 2, 3 for the empirical size, we obtained six homogeneous groups of tests for simulation S1, and five homogeneous groups of tests for models M1 and M2 in each case, and for the empirical power, seven homogeneous groups of tests for simulation S2 and models M3-M6 in the Wiener case, and six homogeneous groups of tests for models M3-M7 in the normal case (see Table 4). For the empirical size, the best tests are in the last group, while for the empirical power, the best tests are in the first group.

Illustrative examples
In this section, we apply the tests to two real-data examples, using Canadian temperature data and orthosis data. These data sets are commonly used to illustrate the use of statistical methods for real functional data (see Abramovich et al. 2004;Ramsay and Silverman 2005;Zhang 2013;Zhang and Liang 2014). The Canadian temperature data are available in the R package fda, and the orthosis data can be downloaded from "http://www.stat.nus.edu.sg/~zhangjt/books/Chapman/FANOVA. htm".

Canadian temperature data
The Canadian temperature data are the daily temperature records of 35 Canadian weather stations over a year (365 days). Fifteen of the weather stations are in Western Canada, another fifteen in Eastern Canada, and the remaining five in Northern Canada. Panels (a)-(c) of Fig. 1 present the raw Canadian temperature curves for these 35 weather stations. From Fig. 1, it can be seen that the temperatures at the Eastern and Western weather stations are generally higher than those at the Northern weather stations. The reason for this is probably that the Northern stations are located at higher latitudes. We would like to check statistically whether location has an effect on the mean temperature curves of the Eastern, Western and Northern weather stations. This problem was considered by Zhang (2013), and it is equivalent to the one-way ANOVA problem for functional data with k = 3. To solve this problem, we applied all of the tests under consideration, obtaining the results given in Table 5 (the estimates of the parameters of the L 2 N, L 2 B, FN, FB and GPF tests are given in Table 20 in the Supplementary Materials). The p-values of the first fourteen tests are less than the significance level 0.05, and the value of the test statistic of the FL test is greater than the critical value, hence it can be concluded that location has an effect on the mean temperature curves of the Eastern, Western and Northern weather stations.

Orthosis data
As reported by Abramovich et al. (2004), the orthosis data were acquired and computed in an experiment by Dr. Amarantini David and Dr. Martin Luc (Laboratoire Sport et Performance Motrice, EA 597, UFRAPS, Grenoble University, France). They investigated how muscle redundancy could be appropriately used to cope with an external perturbation while complying with the mechanical requirements related either to balance control and/or minimum energy expenditure. In the experiment, seven young male volunteers wore a spring-loaded orthosis of adjustable stiffness under the following The critical values of this test given in (7) for the results of the simulation S1, the simulation S2, the models M1 and M2 in each case, the models M3-M7 in the normal case, and the models M3-M6 in the Wiener case with n i = 10, i = 1, 2, 3 are equal to 4.680342, 4.289605, 5.732225, 3.625378 and 4.053295 respectively four experimental conditions: a control condition (without orthosis); an orthosis condition (with orthosis); and two spring conditions (with spring 1 or with spring 2) in which stepping-in-place was perturbed by fitting a spring-loaded orthosis onto the right knee joint. All volunteers tried all four conditions 10 times for 20 s each. To avoid possible perturbations in the initial and final parts of the experiment, only the central 10 s were used in the study. The resultant moment of force at the knee was derived by means of body segment kinematics recorded with a sampling frequency of 200 Hz. For each stepping-in-place replication, the resultant moment was computed at 256 time points, equally spaced and scaled to the interval [0, 1] so that a time interval corresponded to an individual gait cycle. Similarly to Zhang and Liang (2014), we use only the first volunteer's orthosis data under the four experimental conditions for illustrative purposes. The raw orthosis curves of the first volunteer under the four experimental conditions are given in Panels (a)-(d) of Fig. 2. We are interested in testing whether the mean orthosis curves of the first volunteer are different under the four experimental conditions. This is a one-way ANOVA problem for functional data with k = 4. Zhang and Liang (2014) used the pointwise F-test for this problem. This test suggests that the mean orthosis curves of the first volunteer under the four experimental conditions are not the same, but they may be the same over the interval [0.8, 1], i.e. at the last stage of the experiment. The results of all of the tests under consideration are presented in Table 5 (the estimates of the parameters of the L 2 N, L 2 B, FN, FB and GPF tests are given in Table 20 in

Conclusions
In this paper we have presented comprehensive simulation studies to compare existing tests and new tests for the one-way ANOVA problem (1) for functional data. A large part of the simulations was based on real labeled time series data sets, and for this reason they describe the size and the power of the tests better than simulations based on artificial data. The simulations suggest that the tests do not perform equally well. Moreover, there is no single test that performs best. When the functions are observed on a moderate or large grid of design time points, the GPF, L 2 B, FP and FB tests seem to perform best, although the FP test can be time-consuming. The situation changes when the functions are observed on a short grid of design time points. Here, depending on the structure of the functional data, the FP test or the LH, W and P tests seem to perform best. Moreover, the FP test is also very fast in such a case. Finally, it is worth to mention that the results of performance of the R and FL tests confirm that the investigation of the empirical size of a test is very important and should not be omitted.

Supplementary Materials
Supplementary Materials contain the R codes of the programs, which allow to perform the tests for the one-way ANOVA problem for functional data considered in the paper, and the tables, which contain empirical sizes and powers of those tests obtained in remaining simulations S1 and S2 respectively, and in models M1-M2 and M3-M7 respectively; the results of multiple comparisons of tests in simulations S1 and S2 and models M1-M7 with n i = 20, 30, i = 1, 2, 3 (see Sect. 3.3); the estimates of the parameters of the L 2 N, L 2 B, FN, FB and GPF tests for the Canadian temperature data and the orthosis data for  The critical values of the FL test are equal to 3.843317 (T * = 100), 3.843317 (T * = 100) and 3.820904 (T * = 51) respectively (see Table 1 in the Supplementary Materials) Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.
The definition of the norm of the space L 2 (T ) implies ||X i −X || 2 2 = T (X i (t) −X (t)) 2 dt.
From the basis function representation of X i j (t), it follows that Since {φ l } is an orthonormal basis, T φ(t)φ (t)dt is equal to the identity matrix of size K + 1. Therefore Thus since n 1 +· · ·+n k = n, k i=1 n i ||X i −X || 2 2 = a − b, where a and b are given in Proposition 1. The denominator of F given by (6) may be handled in much the same way, which completes the proof.
Proof of Lemma 1 Let C i = (c i1 , . . . , c in i ), i = 1, . . . , k. For i, j = 1, . . . , k, we have Hence the sums n i m=1 n i s=1 c im c is , n i m=1 n t v=1 c im c tv , n i j=1 c i j c i j are equal to the sum of entries of the matrix C i C i , the sum of entries of the matrix C i C t and the trace of the matrix C i C i respectively, i.e. they are equal to 1 n i C i C i 1 n i , 1 n i C i C t 1 n t and tr(C i C i ), respectively. This finishes the proof.