A Nonparametric Lack-of-Fit Test of Constant Regression in the Presence of Heteroscedastic Variances
We consider a k-nearest neighbor-based nonparametric lack-of-fit test of constant regression in presence of heteroscedastic variances. The asymptotic distribution of the test statistic is derived under the null and local alternatives for a fixed number of nearest neighbors. Advantages of our test compared to classical methods include: (1) The response variable can be discrete or continuous regardless of whether the conditional distribution is symmetric or not and can have variations depending on the predictor. This allows our test to have broad applicability to data from many practical fields; (2) this approach does not need nonlinear regression function estimation that often affects the power for moderate sample sizes; (3) our test statistic achieves the parametric standardizing rate, which gives more power than smoothing-based nonparametric methods for moderate sample sizes. Our numerical simulation shows that the proposed test is powerful and has noticeably better performance than some well known tests when the data were generated from high frequency alternatives or binary data. The test is illustrated with an application to gene expression data and an assessment of Richards growth curve fit to COVID-19 data