VECM.rank_test#

VECM.rank_test(*, small_sample=False, simulations=25_000, steps=500, seed=20260819)[source]#

Trace and maximum-eigenvalue tests for every candidate rank.

Independent of the rank this model was constructed with: the eigenvalue problem does not know about it, so the test is a property of the data and the lag length alone and can be read before committing to a specification.

With an exogenous block the null distribution is the conditional one of Pesaran, Shin and Smith, which the simulator is told about through n_exog. Its critical values are materially larger, so a conditional statistic read against the unconditional table would over-reject.

Parameters:
  • small_sample (bool) – Apply the Reinsel-Ahn scaling (T - (k_y + k_x) * p) / T. The asymptotic test over-rejects in short samples – around seven percent at a nominal five in a three-variable system with four hundred observations – and this pulls it back.

  • simulations (int) – Replications behind each p-value.

  • steps (int) – Discretization of the simulated Brownian path.

  • seed (int) – Fixed so a p-value is reproducible.

Return type:

_JohansenRankTest

Returns:

A _JohansenRankTest.