This article proposes tests for unit root and other forms of nonstatio
narity that are asymptotically locally most powerful against a certain
class of alternatives and have asymptotic critical values given by th
e chi-squared distribution. Many existing unit root tests do not share
these properties. The alternatives include fractionally and seasonall
y fractionally differenced processes. There is considerable flexibilit
y in our choice of null hypothesis, which can entail one or more integ
er or fractional roots of arbitrary order anywhere on the unit circle
in the complex plane. For example, we can test for a fractional degree
of integration of order 1/2; this can be interpreted as a test for no
nstationarity against stationarity. ''Overdifferencing'' stationary nu
ll hypotheses can also be tested. The test statistic is derived via th
e score principle and is conveniently expressed in the frequency domai
n. The series tested are regression errors, which, when the hypothesiz
ed differencing is correct, are white noise or more generally have wea
k parametric autocorrelation. We establish the null and local limit di
stributions of the statistic under mild regularity conditions. We find
that Bloomfield's exponential spectral model can provide an especiall
y neat form for the test statistic. We apply the tests to a number of
empirical time series originally analyzed by Box and Jenkins, and in s
everal cases find that our tests reject the order of differencing that
Box and Jenkins proposed. We also report Monte Carlo studies of finit
e-sample behavior of versions of our tests and comparisons with other
tests.