JohansenRankTest.selected_rank#

JohansenRankTest.selected_rank(*, alpha=0.05, statistic='trace')[source]#

First rank the sequence fails to reject.

Parameters:
  • alpha (float) – Level for each step of the sequence.

  • statistic (str) – "trace" or "max_eigenvalue".

Return type:

int

Returns:

The chosen rank, or k_endog if every null is rejected, which is the finding that the system is stationary in levels and does not want a vector error-correction representation at all.

Raises:

SpecificationError – If the level or the statistic is unrecognized.