Epidemic changepoint detection in the presence of nuisance changes.Many time series problems feature epidemic changes-segments where a parameter deviates from a background baseline.  Detection of such changepoints can be improved by accounting for the epidemic structure, but this is currently difficult if the background level is unknown.  Furthermore, in practical data the background often undergoes nuisance changes, which interfere with standard estimation techniques and appear as false alarms.  To solve these issues, we develop a new, efficient approach to simultaneously detect epidemic changes and estimate unknown, but fixed, background level, based on a penalised cost.  Using it, we build a two-level detector that models and separates nuisance and signal changes.  The analytic and computational properties of the proposed methods are established, including consistency and convergence.  We demonstrate via simulations that our two-level detector provides accurate estimation of changepoints under a nuisance process, while other state-of-the-art detectors fail.  In real-world genomic and demographic datasets, the proposed method identified and localised target events while separating out seasonal variations and experimental artefacts.


 Supplementary Information
 The online version contains supplementary material available at 10.1007/s00362-022-01307-x.
R