{'fraction_non_alphanumeric': 0.02097902097902098, 'fraction_numerical': 0.0, 'mean_word_length': 4.964285714285714, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A note on a nonparametric regression test through penalized splines.

We examine a test of a nonparametric regression function based on penalized spline smoothing. We show that, similarly to a penalized spline estimator, the asymptotic power of the penalized spline test falls into a small- K or a large-K scenarios characterized by the number of knots K and the smoothing parameter. However, the optimal rate of K and the smoothing parameter maximizing power for testing is different from the optimal rate minimizing the mean squared error for estimation. Our investigation reveals that compared to estimation, some under-smoothing may be desirable for the testing problems. Furthermore, we compare the proposed test with the likelihood ratio test (LRT). We show that when the true function is more complicated, containing multiple modes, the test proposed here may have greater power than LRT. Finally, we investigate the properties of the test through simulations and apply it to two data examples.