Scandinavian Journal of Statistics, Vol. 42: 197 –213, 2015 doi: 10.1111/sjos.12102 © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. Published by Wiley Publishing Ltd. A Non-parametric ANOVA-type Test for Regression Curves Based on Characteristic Functions JUAN CARLOS PARDO-FERNÁNDEZ Departamento de Estatística e I.O., Universidade de Vigo MARÍA DOLORES JIMÉNEZ-GAMERO Departamento de Estadística e I.O., Universidad de Sevilla ANOUAR EL GHOUCH ISBA, Université Catholique de Louvain ABSTRACT. This article studies a new procedure to test for the equality of kregression curves in a fully non-parametric context. The test is based on the comparison of empirical estimators of the characteristic functions of the regression residuals in each population. The asymptotic behaviour of the test statistic is studied in detail. It is shown that under the null hypothesis, the distribution of the test statistic converges to a finite combination of independent chi-squared random variables with one degree of freedom. The coefficients in this linear combination can be consistently estimated. The proposed test is able to detect contiguous alternatives converging to the null at the rate n1=2. The practical performance of the test based on the asymptotic null distribution is investigated by means of simulations. Key words: comparison of regression curves, empirical characteristic function, non-parametric regression, regression residuals 1. Introduction Testing for the equality of the means of kpopulations .k 2/ is a classical problem in Statistics. When the populations are assumed to follow a normal distribution with equal variance, then the ANOVA F-test is the classical way to perform the test. In this paper, we consider a more general setting. We assume that in each population along with the response variable, Y, we observe another variable, X, the covariate, so that the mean and the variance of the response variable depend on the values of the covariate. More specifically, let .Xj;Y j/; 1 jk,bek-independent random vectors satisfying general non-parametric regression models YjDmj.Xj/Cj.Xj/"j;(1) where mj.x/ DE.YjjXjDx/ is the regression function, 2 j.x/ DVar.YjjXjDx/ is the conditional variance function and "jis the regression error, which is assumed to be independent of Xj. Note that by construction, E."j/D0and Var."j/=1. The covariate Xj is continuous with density function fj. The regression functions, the variance functions, the distribution of the errors and the distribution of the covariates are unknown, and no parametric models are assumed for them. Under this framework, our approach is fully non-parametric. In this conditional setting, the hypothesis of equality of means is stated in terms of the conditional means or regression functions H0Wm1Dm2D:::Dmk; 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
198 J. C. Pardo-Fernández et al. Scand J Statist 42 or in other words, the mean effect of the covariates over the responses is equal in the kpopulations. Because the objective is to compare the regression curves, it is reasonable to assume that the covariates have common support. The alternative hypothesis is H1WH0is not true: Note that this testing problem contains the simpler case described in the first paragraph as a particular case by only eliminating the covariates in the models. The problem of testing for the equality of regression curves in non-parametric settings has been previously treated in the statistical literature. The majority of the available papers either are devoted to the comparison of only two curves or impose some restrictive assumptions such as fixed design, equal sample sizes, identical design points and homoscedasticity of the residuals. Examples of such works include Delgado (1993), Kulasekera (1995), Munk & Dette (1998), Neumeyer & Pardo-Fernández (2009) and Srihera & Stute (2010), among many others. To the best of our knowledge, the most related works to ours are the papers of Neumeyer & Dette (2003) and of Pardo-Fernández et al. (2007). These papers proposed and studied a procedure to test the hypothesis of equality of k.k 2/ regression functions based on the comparison of marked empirical processes of the residuals for the former and the comparison of distribution functions of the residuals for the latter. In this work, we investigate a new test procedure based on a weighted process generated by the characteristic functions (CFs) of the residuals. Compared with the competitors, the main advantages of the proposed method are the following. First, the test is universally consistent for any fixed alternative without any restrictions on the weight function involved in the definition of the test statistic (except for the fact that it should be positive) and without any restrictions on the distribution of the regression errors. Thus, the method can be applied when the distributions of the errors are arbitrary: continuous, discrete or mixed. This is illustrated in the simulation study where an example with errors having a mixed distribution is given. Second, the test can be used to check the equality of any number of regression curves and can detect local alternatives converging to the null at the rate n1=2. Third, the critical values or the pvalues can be obtained from the asymptotic null distribution of the proposed test statistic. This is not the case for most of the existing methods, which typically rely on bootstrap. In our case, although we study a bootstrap version of our test statistic in order to perform a comparison with other methods, the bootstrap is not needed because we are able to obtain the desired level and a good power even for moderate sample sizes by using the asymptotic null distribution. This is clearly shown for many scenarios considered in the simulation study. Our approach is based on comparing the CFs of the regression errors. More specifically, let "jD¹Yjmj.Xj/º=j.Xj/be the regression error in population j. Let m0be the common regression curve under the null hypothesis and define "0j D¹Yjm0.Xj/º=j.Xj/D"jC¹mj.Xj/m0.Xj/º=j.Xj/; (2) 1jk. It turns out that the null hypothesis H0is true if and only if, for all 1jk, the random variables "jand "0j have the same distribution (see theorem 1 in Pardo-Fernández et al., 2007). This assessment can be interpreted in terms of the cumulative distribution function (CDF) or in terms of any other function characterizing the probability law of the errors. Pardo-Fernández et al. (2007) restricted their attention to the CDF. The probability law of any random variable Xis also characterized by its CF, '.t/ D E¹exp.itX/º. Recent years have witnessed an increasing number of proposals for hypothesis testing whose test statistics measure deviations between the empirical CF (ECF) of the © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Scand J Statist 42 An ANOVA-type test for regression curves 199 available data and an estimator of the CF under the null hypothesis. In the line of the setting considered in this paper, that is, by assuming that the data are generated by regression models, are the papers by Jiménez-Gamero et al. (2005) and Hušková & Meintanis (2007, 2010), for testing goodness of fit for the errors, and Hušková & Meintanis (2009) for testing goodness of fit of the regression function to a parametric function. An advantage of the CF approach over the one based on the CDF, as observed in Hušková & Meintanis (2009), is that the former usually requires less stringent assumptions for its validity. In addition, from the simulation results that can be found in the literature (see, for example, Hušková & Meintanis, 2010), the tests based on the ECF compete very satisfactorily with those based on the empirical CDF (ECDF). Having in mind the reasons earlier, the purpose of the present paper is to test H0by comparing consistent estimators of the CFs of the random variables "jand "0j ,say O'j.t/ and O'0j .t/, respectively, 1jk. To measure deviations between these estimators, we consider a Cramér–von Mises type test statistic. In order to derive the asymptotic null distribution of the test statistic, we first give a stochastic expansion for the differences O'j.t/ O'0j .t/. As a consequence of this expansion, it is shown that the test statistic converges in law to a finite linear combination of independent chi-squared variables. Moreover, under certain weak conditions on the distributions of the errors and the covariates, the asymptotic null distribution is proportional to a 2 k1distribution. We provide consistent estimators of the coefficients appearing in this linear combination, which allow us to propose a consistent estimator of the asymptotic null distribution. The behaviour of the test under fixed and local alternatives is also studied. Specifically, it is shown that the proposed test is able to detect any fixed alternative and contiguous alternatives converging to the null at the rate n1=2, where ndenotes the total sample size. In contrast to the procedure in Pardo-Fernández et al. (2007), to derive these properties, we do not require further assumptions on the distribution on the errors, such as that they have a probability density. For finite sample, the quality of the proposed approximation of the null distribution of the test statistic and the power are investigated numerically. From this numerical study, we conclude that the proposed approximation of the null distribution works adequately for moderate sample sizes, and in terms of power, the proposed test competes very satisfactorily with those based on the ECDF. The paper is organized as follows. Section 2 introduces the test statistic and also provides an alternative expression, which is useful from a computational point of view. The asymptotic null distribution of the test statistic and the behaviour of the test under fixed and local alternatives are studied in Section 3. Section 4 reports a summary of a numerical study conducted to study the practical performance of the test and to compare it with other existing methods. Section 5 concludes the paper. All proofs of the theoretical results are deferred to the Supporting information. The following notation will be used along the paper: P0denotes probability assuming that H0is true; E0denotes expectation assuming that H0is true; Pdenotes the conditional probability law, given the data; all limits in this paper are taken when n!1IL !denotes convergence in distribution; P !denotes convergence in probability; a:s: !denotes the almost sure convergence; if x2Rk, with x0D.x1;:::;x k/, then diag.x/ is the kkdiagonal matrix whose .i; i/ entry is xi;1 ik; for any complex number ´DaCib; Re.´/ Dais its real part, N´Daib is its conjugate and j´jis its modulus; Nk.; †/ denotes the multivariate normal distribution with mean vector and variance-covariance matrix †; an unspecified integral denotes integration over the whole real line R; for a given non-negative real-valued function wand for any complex-valued measurable function g, we denote kgkwDRjg.t/j2w.t/dt1=2 to the norm in the Hilbert space L2.R;w/. © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
200 J. C. Pardo-Fernández et al. Scand J Statist 42 2. The test statistic Let .Xjl;Y jl/; 1 lnjbe independent and identically distributed observations from .Xj;Y j/; 1 jk. Let fj.x/ be the probability density function (PDF) of Xj;n D Pk jD1nj, and let fmix.x/ DPk jD1pjfj.x/ be the PDF of the mixture of covariates according to the weights p1;:::;p k, where pjDlim nj=n. In order to estimate the errors, we first need to estimate the regression functions, mj.x/ DE.YjjXjDx/, the variance functions, 2 j.x/ DE¹Yjmj.x/º2jXjDx, and the common regression function under H0;m 0.x/ DPk jD1pj¹fj.x/=fmix.x/ºmj.x/. With this aim, we use non-parametric estimators on the basis of kernel smoothing techniques. Let Kdenote a non-negative kernel function defined on R, and let 0<h nh!0be the bandwidth or smoothing parameter and Kh.x/ Dh1K.x=h/. We use the following estimators for the functions mj;2 jand m0: Omj.x/ D nj X lD1 wjl.x/Yjl;O2 j.x/ D nj X lD1 wjl.x/Y 2 jl Om2 j.x/; Om0.x/ D k X jD1 nj nO fj.x/ O fmix.x/ Omj.x/; where O fj.x/ Dn1 j nj X lD1 Kh.x Xjl/; O fmix.x/ D k X jD1 nj nO fj.x/; 1jk. The quantities wjl are either the local-linear weights given by wjl.x/ DKh.Xjl x/®S2;nj.x/ .Xjl x/S1;nj¯ S0;nj.x/S2;nj.x/ S2 1;nj.x/ ; with Sk;nj.x/ DPnj lD1.Xjl x/kKh.Xjl x/;k D0; 1; 2, or the Nadaraya–Watson weights wjl.x/ DKh.Xjl x/ Pnj vD1Kh.Xjv x/: Both are particular cases of local-polynomial weighting (Fan & Gijbels, 1996). Under the model assumptions that will be stated in the next section, the results in this article are valid for local-linear and for Nadaraya–Watson (local-constant) estimators. On the basis of these estimators, for each population j;1 jk, we construct two samples of residuals: O"jl DYjl Omj.Xjl/ Oj.Xjl/and O"0j l DYjl Om0.Xjl/ Oj.Xjl/; 1lnj, whose ECFs are O'j.t/ D1 nj nj X lD1 exp.itO"jl/and O'0j .t/ D1 nj nj X lD1 exp itO"0j l ; respectively. These ECFs are nothing but (consistent) kernel-based non-parametric estimators of the population CFs 'j.t/ DE¹exp.it"j/ºand '0j .t/ DE¹exp.it"0j /º, respectively, where "0j is as defined in (2). The testing procedure consists of comparing O'j.t/ and O'0j .t/,1j © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Scand J Statist 42 An ANOVA-type test for regression curves 201 k, using a weighted L2-distance. More precisely, following the work of Hušková & Meintanis (2007, 2009, 2010), we define the test statistic T1n T1n.w/ D k X jD1 nj nkO'j.t/ O'0j .t/k2 w; where wis any given non-negative weight function with finite integral, Rw.t/dt < 1. The presence of the weight function win the integrals appearing in the expression of T1n is necessary in order to ensure their finiteness, because kO'j.t/ O'0j .t/k2 w4Rw.t/dt, for all j. The motivation behind the test statistic T1n is the following: T1n converges in probability to (theorem 3) T1T1.w/ D k X jD1 pjk'j.t/ '0j .t/k2 w:(3) Under H0;' j.t/ D'0j .t/ for all tand for 1jk, and thus T1vanishes. As a consequence, under H0;T 1n should be ‘very small’. We then conclude that any value of T1n, which is ‘significantly large’, should lead to the rejection of H0. In practice, given a significance level, a threshold value above which H0is rejected needs to be established. To this end, we need to study the null distribution of T1n. Because this distribution is unknown, as an approximation to it, we derive the asymptotic null distribution. This will be carried out in the next section. Remark 2.1. From lemma 1 in Alba-Fernández et al. (2008), an alternative expression for T1n, which is useful from a computational point of view, is given by nT1n D k X jD1 1 nj8 < : nj X l;sD1 IwO"jl O"jsC nj X l;sD1 IwO"0j l O"0j s 2 nj X l;sD1 IwO"jl O"0j s 9 = ; ; where Iw.t/ DRcos.tx/w.x/dx.Ifwis a PDF with CF 'wthen Iw.t/ DRe¹'w.t/º, which clearly coincides with 'wwhen wis a symmetric PDF. 3. Asymptotics In order to study the limit behaviour of the test statistic T1n, we first need to introduce some assumptions on the models (1) and on the available data. Recall that we are assuming that ¹.Xjl;Y jl/; 1 lnjºare independent and identically distributed observations from .Xj;Y j/and the sets ¹.X1l ;Y 1l /; 1 ln1º;:::;¹.Xjk;Y jk/; 1 lnkºare independent. Assumption (A): (A.1) For 1jk: (i) Xjhas a compact support R. (ii) fj;m jand jare two times continuously differentiable on R. (iii) infx2Rfj.x/>0and infx2Rj.x/>0. (A.2) For 1jk: the sample sizes satisfy limnj=n Dpj, where 0<p j<1. (A.3) Kis a twice continuously differentiable symmetric PDF with compact support. (A.4) The weight function satisfies w.t/ 0, for all t2R, and Rt4w.t/dt < 1. (A.5) nh4 n!0and nh2 n=lnn!1. These assumptions are mainly needed to guarantee the uniform consistency of the kernel estimators O fj;Oj;Omjand Om0. Unlike the methods based on the ECDF, observe that we do not impose any restriction on the distribution of the errors, like the existence of a PDF. So the © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
202 J. C. Pardo-Fernández et al. Scand J Statist 42 results in this paper could be used to compare two or more regression functions when the distributions of the errors are arbitrary: continuous, discrete or mixed. An example with errors having a mixed distribution is given in Section 4. 3.1. Asymptotic null distribution The following theorem gives an asymptotic approximation for pnj¹O'j.t/ O'0j .t/º;1 j nj, which will allow us to derive the asymptotic null distribution of the test statistic T1n, given in the subsequent corollary. Let †D.jv/1j;vkbe the matrix whose elements are jj D12pjE²fj.Xj/ fmix.Xj/³Cpj k X rD1 prE´2 r.Xr/ 2 j.Xr/ f2 j.Xr/ f2 mix.Xr/μ; jv Dppjpv k X rD1 prE´2 r.Xr/ j.Xr/v.Xr/ fj.Xr/fv.Xr/ f2 mix.Xr/μ ppjpvE²v.Xv/ j.Xv/ fj.Xv/ fmix.Xv/Cj.Xj/ v.Xj/ fv.Xj/ fmix.Xj/³;j¤v: (4) Theorem 1. Under assumptions (A.1)–(A.3) and (A.5), if H0is true, then pnj¹O'j.t/ O'0j .t/ºDit'j.t/ZjCtR1j .t/ Ct2R2j .t/; where suptjRsj .t/jDop.1/; s D1; 2 and ZWD .Z1;:::;Z k/0Nk.0; †/. Define the diagonal matrix ADdiag.a1;:::;a k/, where ajDkt'j.t/k2 w;1 jk. The results in the theorems and the corollaries in the succeeding text will hold whenever trace.A†/ > 0. Before stating the results, we briefly discuss this condition. Observe that trace.A†/ D k X jD1 ajjj >0if and only if aj>0and jj >0for some j;1 jk: The quantities jj in (4) can be also expressed as jj Dpj k X lD1 plE"2 l.Xl/ 2 j.Xl/²fj.Xl/ fmix.Xl/I.l Dj/ pl³2#; where I.A/ denotes the indicator function of the set A. From assumptions (A.1)(iii) and (A.2), it follows that jj >0for all j. Thus, to ensure trace.A†/ > 0, we only need to ensure that aj>0for some j. An easy way to obtain aj>0is by taking w.t/ > 0,fortin a neighbourhood of the origin. The following assumption will appear in the statement of some of the results in the succeeding text. Assumption (B): aj>0for some 1jk. Corollary 1. Under assumptions (A) and (B), if H0is true, then nT1n L ! W1DZ0AZ, where Zis as in theorem 1. In other words, the limiting distribution of nT1n under H0is a finite linear combination of independent chi-squared variables, Pk jD1ˇj2 1;j , where 2 1;1;:::; 2 1;k are independent chisquared random variates with one degree of freedom and ˇ1;:::;ˇ kare the eigenvalues of © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Scand J Statist 42 An ANOVA-type test for regression curves 203 A†. Unfortunately, the quantities ˇjin this linear combination are unknown. They depend on the distribution of the errors through the a1;:::;a kand on the distribution of the covariates through †D.jv/1j;vk. They also depend on the unknown design densities, fj, and the conditional variance functions, 2 j. So to use theorem 1 in practice, one first needs to find a consistent estimator, say O ˇj, for every ˇj;1jk. This can be easily carried out via plug-in method using the estimators defined earlier instead of the unknown functions 'j;f j;f mix and 2 j. In order to perform the test, we also need to approximate the distribution of Pk jD1O ˇj2 1;j , which can be carried out via Monte Carlo method or some numerical method (see, for example, Kotz et al., 1967, Castaño-Martínez & López-Blázquez, 2005). With such a distribution, we can finally obtain the critical value and/or the p-value for the test based on T1n. The next result states the validity of this procedure. To estimate aj, we replace 'j.t/ by O'j.t/ in its expression obtaining QajDZt2jO'j.t/j2w.t/dt D1 n2 j nj X r;sD1Zt2cos ®tO"jr O"js¯w.t/dt Dnj1 njOajC1 njZt2w.t/dt; where OajD1 nj 2!X 1r<snj D2IwO"jr O"js;1jk; (5) D2Iw.t/ D@2 @t2Iw.t/ DRt2cos.tu/w.u/du and Iwis as defined in Remark 2.1. Because Rt2w.t/dt is a constant term, we estimate ajby Oaj, which resembles a U-statistic. Let O AD diag.Oa1;:::;Oak/and O †DOjv1j;vk, with Ojj D12OpjOjCOpjPk rD1OprOjj r ;Ojv D pOpjOpvPk rD1OprOjvr pOpjOpvOjv COvj ;j ¤v, OpjDnj n;OjD1 nj nj X lD1 O fj.Xjl/ O fmix.Xjl/;Ojv D1 nv nv X lD1 Ov.Xvl/ Oj.Xvl/O fj.Xvl/ O fmix.Xvl/; Ojvr D1 nr nr X lD1 O2 r.Xrl/ Oj.Xrl/Ov.Xrl/O fj.Xrl/O fv.Xrl/ O f2 mix.Xrl/; 1j;v; r k. Let W1n DPk jD1O ˇj2 1j , where 2 11;:::; 2 1k are independent chi-squared variables with one degree of freedom and O ˇ1;:::; O ˇkare the eigenvalues of O AO †. Theorem 2. Under assumptions (A) and (B), sup xjP0¹nT1n xºP.W1n x/jP ! 0: Remark 3.1. If all the covariates have the same distribution, f1D::: Dfk, and all variance functions are equal, 1D:::Dk, then †DIkpp0;p 0Dpp1;:::;ppk:(6) In this case, it is easy to see that †has two different eigenvalues: 0, with multiplicity 1, and 1, with multiplicity k1. Therefore, if it is also assumed that the laws of the errors are such that © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
204 J. C. Pardo-Fernández et al. Scand J Statist 42 aDa1D:::Dak(for instance, if they also have the same distribution), then a1nT1n.w/ L ! Pk1 jD12 1j D2 k1, which coincides with the null distribution of the classical ANOVA test for comparing means. To obtain a consistent null distribution estimator of nT1n.w/ in this case, it suffices to have a consistent estimator of a. Corollary 2. Suppose that assumptions (A) and (B) hold. If all covariates have the same distribution, all variance functions are equal and the laws of the errors are such that aDa1D:::Dak, then sup xjP0¹nT1n xºP.W01n x/jP ! 0; where W01n DOa2 k1, with OaDPk jD1OpjOaj, and Oajis as defined by (5). The result in corollary 1 tells us that nT1n DOP.1/. As a decision rule for testing H0against H1, we propose to use ‰1;˛ DI.nT1n >t 1;˛/, where t1;˛ is the 1˛percentile of the null distribution of nT1n or any consistent estimator of it. 3.2. Consistency In this section, we study the test statistic T1n when the alternative hypothesis is fixed. The following theorem shows that with probability tending to 1; T1n behaves (asymptotically) like T1, see (3). This will allow us to derive the consistency of the test 1;˛. Theorem 3. Suppose that assumption (A) holds. Then, T1n DT1Cop.1/, where T1is as defined in (3). As an immediate consequence of the above theorem and corollary 1, we conclude that the test ‰1;˛ is consistent against all fixed alternatives. This property is formally stated in the following corollary. Corollary 3. Suppose that assumption (A) and the alternative hypothesis H1hold. If w.t/>0, for all t2R, then limn!1 P.‰1;˛ D1/ D1, for any 0<˛<1. It is known that two distinct CFs can be equal in a finite interval (see, for example, Feller, 1971, p. 479). In order to ensure that T1>0whenever mr¤ms, for some 1r; s k; r ¤s, we made the assumption that w>0. It is important to note that this assumption does not involve any characteristic of the underlying data-generating procedure. For instance, taking w to be the PDF of, for example, a normal law guarantees the universal consistency of our test. In opposition, some existing works made rather restrictive assumptions that exclude certain type of alternatives. For example, the test of Srihera & Stute (2010) may not be able to detect a difference between two crossing curves. 3.3. Local alternatives In this section, we study the limiting behaviour of the test statistic under local alternatives converging to the null hypothesis at the rate n1=2. Specifically, let us consider the following local alternative hypothesis H1;n WmjDm00 Cn1=2rj;1jk; © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Scand J Statist 42 An ANOVA-type test for regression curves 205 where m00 is assumed to be two times continuously differentiable and the functions rjsatisfy E°r2 j.Xl/±<1;1j;l k: (7) Theorem 4. Under assumption (A) and the alternative hypothesis H1;n, if (7) holds, then pnj¹O'j.t/ O'0j .t/ºDit'j.t/ ZjCppjjCRj.t/; where kRjkwDop.1/; Z D.Z1;:::;Z k/0is as in theorem 1 and jD k X vD1 pvE²fv.Xj/rv.Xj/ fmix.Xj/j.Xj/³E²rj.Xj/ j.Xj/³;1jk: Corollary 4. Under assumption (A) and the alternative hypothesis H1;n, if (7) holds, then nT1n L ! .Z C/0A.Z C/, where Zis as defined in theorem 1 and 0Dpp11;:::; ppkk. We conclude that although the test based on the rule ‰1;˛ is fully non-parametric, it is able to detect local alternatives converging to the null hypothesis at the rate n1=2 whenever 0A¤0. 3.4. A second test statistic The paper by Pardo-Fernández et al. (2007) studies two Kolmogorov–Smirnov and two Cramér–von Mises type statistics for testing H0based on the ECDF of the residuals. Our test statistic T1n can be seen as the CF analogue of their first Cramér–von Mises type statistic. An ECF version of their second Cramér–von Mises type statistic is T2n DkO'.t/ O'0.t/k2 w; where O'.t/ DPk jD1 nj nO'j.t/ and O'0.t/ DPk jD1 nj nO'0j .t/, which are consistent estimators of '.t/ DPk jD1pj'j.t/ and '0.t/ DPk jD1pj'0j .t/, respectively. The motivation of this statistic is that the equality of '.t/ and '0.t/ also characterizes the null hypothesis. The same steps followed in the analysis of T1n can be used to study T2n. In particular, T2n can be computed as (Remark 2.1) n2T2n D k X j;vD1 nj X lD1 nv X sD1®IwO"jl O"vsCIwO"0j l O"0vs2IwO"jl O"0vs¯: The asymptotic null distribution of T2n is given in the following result, which is analogous to corollary 1. Corollary 5. Let BDdiag.p/Cdiag.p/, where pis as defined in (6) and CD.cjv/1j;vkis the matrix with elements cjv DZt2Re °'j.t/'v.t/±w.t/dt; 1 j;v; k: Under assumption (A), if H0is true and trace.B†/ > 0, then nT2n L ! W2DZ0BZ, where Z is as in theorem 1. © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
212 J. C. Pardo-Fernández et al. Scand J Statist 42 the weight function involved in the definition of the test statistic, the resulting test is consistent against any fixed alternative and is able to detect contiguous alternatives converging to the null at a rate n1=2. To derive these properties, we have assumed certain assumptions, which are weaker than those required by those based on the ECDF. Specifically, no requirement is imposed on the distributions of the errors. An estimation of the asymptotic null distribution has been proposed as an estimator of the null distribution of the test statistic. In the cases tried in our numerical experiments, it is observed that this approximation works, in the sense of providing type I errors close to the nominal values, specially when the sample sizes are at least 100. For smaller sample sizes, it is recommended to approximate the null distribution through a bootstrap mechanism. Acknowledgements The authors thank the anonymous referees for their constructive comments and suggestions that helped to improve the presentation. J. C. Pardo-Fernández has been financially supported by grant MTM2011-23204 (FEDER support included) of the Spanish Ministry of Science and Innovation. M. D. Jiménez-Gamero has been financially supported by grant UJA2013/08/01 (University of Jaén and Caja Rural Provincial of Jaén). A. El Ghouch acknowledges financial support from IAP research network P6/03 of the Belgian Government (Belgian Science Policy) and from the contract ‘Projet d’Actions de Recherche Concertées’ (ARC) 11/16-039 of the ‘Communauté française de Belgique’, granted by the ‘Académie universitaire Louvain’. References Alba-Fernández, V., Jiménez-Gamero, M. D. & Muñoz-García, J. (2008). A test for the two-sample problem based on empirical characteristic functions. Comput. Statist. Data Anal. 52, 3730–3748. Anderson, N. H., Hall, P. & Titterington, D. M. (1994). Two-sample test statistics for measuring discrepancies between two multivariate probability density functions using kernel-based density estimates. J. Multivariate Anal. 50, 41–54. Castaño-Martínez, A. & López-Blázquez, F. (2005). Distribution of a sum of weighted central chi-square variables. Comm. Statist. Theory Methods 34, 515–524. de Uña-Álvarez, J. (2013). Comments on: an updated review of goodness-of-fit tests for regression models. TEST 22, 414–418. Delgado, M. A. (1993). Testing the equality of nonparametric regression curves. Statist. Probab. Lett. 17, 199–204. Epps, T. W. (2005). Tests for location-scale families based on the empirical characteristic function. Metrika 62, 99–114. Epps, T. W. & Pulley, L. B. (1983). A test for normality based on the empirical characteristic function. Biometrika 70, 723–726. Fan, Y. (1998). Goodness-of-fit tests based on kernel density estimators with fixed smoothing parameters. Econom. Theory 14, 604–621. Fan, J. & Gijbels. I. (1996). Local polynomial modelling and its applications, Chapman & Hall, London. Feller, W. (1971). An introduction to probability theory and its applications, Vol. 2, Wiley, New York. González-Manteiga, W. & Crujeiras, R. (2013). An updated review of goodness-of-fit tests for regression models. TEST 22, 361–411. Henze, N., Klar, B. & Zhu, L. X. (2005). Checking the adequacy of the multivariate semiparametric location shift model. J. Multivariate Anal. 93, 238–265. Heuchenne, C. & Van Keilegom, I. (2010). Goodness-of-fit tests for the error distribution in nonparametric regression. Comput. Statist. Data Anal. 54, 1942–1951. Hušková, M. & Meintanis, S. G. (2007). Omnibus tests for the error distribution in the linear regression model. Statistics 41, 363–376. Hušková, M. & Meintanis, S. G. (2009). Goodness-of-fit tests for parametric regression models based on empirical characteristic functions. Kybernetika 45, 960–971. © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
Scand J Statist 42 An ANOVA-type test for regression curves 213 Hušková, M. & Meintanis, S. G. (2010). Tests for the error distribution in nonparametric possibly heteroscedastic regression models. TEST 19, 92–112. Hušková, M. & Meintanis, S. G. (2012). Tests for symmetric error distribution in linear and nonparametric regression models. Comm. Statist. Simulation Comput. 41, 833–851. Jiménez-Gamero, M. D., Muñoz-García, J. & Pino-Mejías, R. (2005). Testing goodness of fit for the distribution of errors in multivariate linear models. J. Multivariate Anal. 95, 301–322. Jiménez-Gamero, M. D., Alba-Fernández, V., Muñoz-García, J. & Chalco-Cano, Y. (2009). Goodness-of- fit tests based on empirical characteristic functions. Comput. Statist. Data Anal. 53, 3957–3971. Kotz, S., Johnson, N. L. & Boyd, D. W. (1967). Series representations of quadratic forms in normal variables. I. Central case. Ann. Math. Statist. 38, 823–837. Kulasekera, K. B. (1995). Comparison of regression curves using quasi-residuals. J. Amer. Statist. Assoc. 90, 1085–1093. Meintanis, S. G. (2013). Comments on: an updated review of goodness-of-fit tests for regression models. TEST 22, 432–436. Munk, A. & Dette, H. (1998). Nonparametric comparison of several regression functions: exact and asymptotic theory. Ann. Statist. 26, 2339–2368. Neumeyer, N. (2009). Smooth residual bootstrap for empirical processes of non-parametric regression residuals. Scand. J. Statist. 36, 204–228. Neumeyer, N. & Dette, H. (2003). Nonparametric comparison of regression curves: an empirical process approach. Ann. Statist. 31, 880–920. Neumeyer, N. & Pardo-Fernández, J. C. (2009). A simple test for comparing regression curves versus onesided alternatives. J. Statist. Plann. Inference 139, 4006–4016. Pardo-Fernández, J. C., Van Keilegom, I. & González-Manteiga, W. (2007). Testing for the equality of k regression curves. Statist. Sinica 17, 1115–1137. Sperlich, S. (2013). Comments on: an updated review of goodness-of-fit tests for regression models. TEST 22, 419–427. Srihera, R. & Stute, W. (2010). Nonparametric comparison of regression functions. J. Multivariate Anal. 101, 2039–2059. Tenreiro, C. (2009). On the choice of the smoothing parameter for the BHEP goodness-of-fit. Comput. Statist. Data Anal. 53, 1038–1053. Received April 2013, in final form April 2014 Juan Carlos Pardo-Fernández, Departamento de Estatística e I.O., Facultade de Ciencias Económicas e Empresariais, Campus Universitario As Lagoas-Marcosende, 36310 Vigo, Spain. E-mail:
[email protected] Supporting information Additional Supporting information may be found in the online version of this article at the publisher’s web site. © 2014 Board of the Foundation of the Scandinavian Journal of Statistics. 14679469, 2015, 1, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/sjos.12102 by Universidad De Sevilla, Wiley Online Library on [02/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License