CointegrationTestResult#

class impulso.results.CointegrationTestResult(*, rank_trace, rank_max_eigen, det_order, k_ar_diff, alpha, n_obs, eigenvalues, table)[source]#

Bases: ImpulsoBaseModel

Result from the Johansen cointegration rank test.

The Johansen procedure walks a sequence of nulls — rank is at most 0, at most 1, and so on — and stops at the first null it fails to reject. Both the trace and maximum-eigenvalue statistics are reported; they can disagree, and when they do the disagreement is information, not an error.

Only critical values are available for this test, not p-values, so alpha is restricted to the levels tabulated by MacKinnon, Haug and Michelis (1996): 0.10, 0.05, and 0.01.

Parameters:
rank_trace#

Cointegration rank selected by the trace statistic.

Type:

int

rank_max_eigen#

Cointegration rank selected by the maximum-eigenvalue statistic.

Type:

int

det_order#

Deterministic trend order passed to the test: -1 for no deterministic term, 0 for a constant, 1 for a linear trend.

Type:

int

k_ar_diff#

Number of lagged differences in the vector error-correction model (VECM), i.e. p - 1 for a VAR(p) in levels.

Type:

int

alpha#

Significance level whose critical-value column was used.

Type:

float

n_obs#

Effective number of observations after differencing and lagging.

Type:

int

eigenvalues#

Estimated eigenvalues, descending.

Type:

numpy.ndarray

table#

One row per null rank r = 0, …, n - 1, indexed by r. Columns are trace_stat, trace_crit, trace_reject, maxeig_stat, maxeig_crit, maxeig_reject.

Type:

pandas.DataFrame

Expand for references to impulso.results.CointegrationTestResult

Stationarity Pitfalls in Climate Data / Cointegration and what to do about it

Testing for Stationarity and Cointegration / Cointegration rank

model_config = {'arbitrary_types_allowed': True, 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property rank: int#

Cointegration rank, by convention the trace-statistic answer.

The trace test is the conventional default because it is more robust in small samples. Compare against rank_max_eigen before relying on it.

Expand for references to impulso.results.CointegrationTestResult.rank

Stationarity Pitfalls in Climate Data / Cointegration and what to do about it

Testing for Stationarity and Cointegration / Cointegration rank

summary()[source]#

Return the sequential rank-test table.

Returns:

DataFrame indexed by the null rank r.

Return type:

DataFrame

Expand for references to impulso.results.CointegrationTestResult.summary

Testing for Stationarity and Cointegration / Cointegration rank