Statistical testing for nonlinearity involves the use of surrogate time ser
ies which mimic given features of the original time series but are random o
therwise. Using the framework of constrained randomization by Schreiber [Ph
ys. Rev. Lett. 80 (1998) 2105] the required structures are imposed on the r
andom sequences by an optimization technique. As a result, the surrogate da
ta fulfil given constraints, specified by a null hypothesis, with some erro
r. In our approach to testing for nonlinearity we require that measures of
significance for rejecting the null hypothesis must be independent of this
error. This criterion turns out to be useful in the investigation of typica
l examples - even for weakly nonstationary time series. Furthermore, it is
shown that testing for unstable periodic orbits (UPOs) is a robust measure
for nonlinearity with respect to different types of surrogate data. (C) 200
1 Elsevier Science Ltd. All rights reserved.