We assume that some consistent estimator b b of an equilibrium relation between non-stationary series integrated of order d 2 ð0:5; 1:5Þ is used to compute residualsû t ¼ y t b bx t (or differences thereof). We propose to apply the semiparametric log-periodogram regression to the (differenced) residuals in order to estimate or test the degree of persistence d of the equilibrium deviation u t : Provided b b converges fast enough, we describe simple semiparametric conditions around zero frequency that guarantee consistent estimation of d: At the same time limiting normality is derived, which allows to construct approximate confidence intervals to test hypotheses on d: This requires that d d40:5 for superconsistent b b; so the residuals can be good proxies of true cointegrating errors. Our assumptions allow for stationary deviations with long memory, 0pdo0:5; as well as for non-stationary but transitory equilibrium errors, 0:5odo1: In particular, if x t contains several series we consider the joint estimation of d and d: Wald statistics to test for parameter restrictions of the system have a limiting w 2 distribution. We also analyse the benefits of a pooled version of the estimate. The empirical applicability of our general cointegration test is investigated by means of Monte Carlo experiments and illustrated with a study of exchange rate dynamics. r 2005 Elsevier B.V. All rights reserved.JEL classification: C14; C22