This paper studies a class of tests useful for testing the goodness-of-fit of an autoregressive model. These tests are based on a class of empirical processes marked by certain residuals. The paper first gives their large sample behavior under null hypotheses. Then a martingale transformation of the underlying process is given that makes tests based on it asymptotically distribution free. Consistency of these tests is also discussed briefly.
"Nonparametric model checks for time series." Ann. Statist. 27 (1) 204 - 236, February 1999. https://doi.org/10.1214/aos/1018031108