statsmodels.tsa.stattools.zivot_andrews¶
-
statsmodels.tsa.stattools.zivot_andrews =
<statsmodels.tsa.stattools.ZivotAndrewsUnitRoot object>¶ Zivot-Andrews structural-break unit-root test.
The Zivot-Andrews test tests for a unit root in a univariate process in the presence of serial correlation and a single structural break.
- Parameters:¶
- x : array_like
The data series to test.
- trim : float
The percentage of series at begin/end to exclude from break-period calculation in range [0, 0.333] (default=0.15).
- maxlag : int
The maximum lag which is included in test, default is 12*(nobs/100)^{1/4} (Schwert, 1989).
- regression : {"c","t","ct"}
Constant and trend order to include in regression.
”c” : constant only (default).
”t” : trend only.
”ct” : constant and trend.
- autolag : {"AIC", "BIC", "t-stat", None}
The method to select the lag length when using automatic selection.
if None, then maxlag lags are used,
if “AIC” (default) or “BIC”, then the number of lags is chosen to minimize the corresponding information criterion,
”t-stat” based choice of maxlag. Starts with maxlag and drops a lag until the t-statistic on the last lag length is significant using a 5%-sized test.
- Returns:¶
zastat (float) – The test statistic.
pvalue (float) – The pvalue based on MC-derived critical values.
cvdict (dict) – The critical values for the test statistic at the 1%, 5%, and 10% levels.
baselag (int) – The number of lags used for period regressions.
bpidx (int) – The index of x corresponding to endogenously calculated break period with values in the range [0..nobs-1].
Notes
H0 = unit root with a single structural break
Algorithm follows Baum (2004/2015) approximation to original Zivot-Andrews method. Rather than performing an autolag regression at each candidate break period (as per the original paper), a single autolag regression is run up-front on the base model (constant + trend with no dummies) to determine the best lag length. This lag length is then used for all subsequent break-period regressions. This results in significant run time reduction but also slightly more pessimistic test statistics than the original Zivot-Andrews method, although no attempt has been made to characterize the size/power trade-off.
References