Stata Technical Bulletin
27
these statistics are the Chow (1960) test, the Quandt (1958, 1960) test, and the CUSUM and CUSUM of squares tests (Brown,
Durbin, and Evans 1975).
These tests are distinguished by their alternative hypotheses and their power. Not surprisingly, tests with narrowly defined
alternatives have more power, at least against the chosen alternative. Unfortunately, narrowly defined tests can be misleading
when confronted with a more general form of parameter instability.
Among the tests mentioned above, the Chow test is the most sharply focused and, thus, the most powerful. The alternative
hypothesis is that one or more regression parameters changed values at a single, known break point. This form of instability
is frequently not plausible. Moreover, it is rare in observational data to know with certainty and exogenously (that is, without
peeking at the data) when the parameters shifted.
The Quandt test is a generalization of the Chow test; it gives up power to broaden the alternative. In the Quandt test, the
alternative hypothesis is that one or more regression parameters changed values at a single, unknown break point. In essence, the
Quandt test performs a Chow test at all potential break points and chooses the statistic that most strongly favors the alternative
hypothesis. A drawback to the Quandt test is that choosing the break point endogenously gives the statistic an unknown
distribution. Critical values must be developed using Monte Carlo or bootstrap methods each time one wishes to perform the test.
In both the Quandt and the Chow tests, the constancy of the error variance is an important part of the maintained hypothesis.
The CUSUM and CUSUM of squares tests are the most general of these tests. They calculate cumulative sums (and sums
of squares) of recursive (rolling, one-step-ahead) residuals. Under the null, the distribution of these cumulative sums is known.
Any model breakdown can lead the cumulative sums to exceed their critical values. Unfortunately, the extreme generality of
the CUSUM and CUSUM of squares tests reduces their power substantially. In practice, the CUSUM and CUSUM of squares tests
frequently have scant success in detecting parameter instability, particularly in observational (as opposed to experimental) data.
[The Stata time series library contains chow, quandt, and cusum: commands for the Chow, Quandt, and CUSUM (and CUSUM of squares)
tests, respectively. cusum and quaπdt are level B commands, which means they produce accurate results but are either not fully documented, not
compatible with the standard time series syntax, or not in conformance with Stata,s guidelines for an estimation command, quandt reports the
results of the Quandt test, but it does not calculate Monte Carlo or bootstrap critical values and confidence intervals, These calculations can be very
time-consuming, chow is a level C command, which means it is incomplete in significant ways but can be used safely by an advanced Stata user,
chow also calculates the Farley-Hinich-McGuire test which allows the variable parameters to follow a deterministic trend after the break point, See
sts7,3 above for more information on the Stata time series library—Ed,]
Hansen’s test
The tests discussed above illustrate a common dilemma—the desire to find a test that accommodates a very general alternative
hypothesis while retaining high power. It is rare that a test statistic with these properties and a known, standard distribution
under the null can be developed.
An alternative approach is to derive an asymptotic approximation to the local power, that is, to the slope of the power
function at the null hypothesis in the direction of interest. This asymptotic approximation can be used to develop tests with
maximal local power (Cox and Hinkley 1974). The test statistics will generally follow nonstandard distributions under the null,
but critical values also can be derived from the asymptotic local power function.
Hansen (1992) has followed this approach in developing an alternative statistic that is the locally most powerful test of the
null hypothesis of constant parameters (both the coefficients and the variance of the error term) against the alternative hypothesis
that the parameters follow a martingale. This alternative is very general: it accommodates parameters that change at unknown
times and parameters that follow a random walk.
The only constraint on the application of Hansen’s test is that the variables in the regression model must be stationary,
that is, the variables must follow unconditional distributions that are constant over time. An example of a nonstationary variable
is the United States gross domestic product. GDP grows as population, the capital stock, and productivity grow. Its mean and
variance are growing over time, thus GDP is not drawn from the same distribution at different points in time. Hansen provides
suggestions for treating models with nonstationary variables.
I have written hausen, an ado-file that calculates the Hansen test. The syntax of hansen is
hansen varlist [if exp [in range [, regress tsfit-options ]
The test statistics are based on the residuals from the regression model in varlist estimated over the entire sample. hansen uses
tsf it (Becketti 1994) to estimate the regression model, hence all the tsf it options can be used. hansen offers one additional
option, regress, which causes the regression output to be displayed. The default is to suppress the regression output.