# What is the stability condition of a vector error correction model (VECM)?

As written in the title, I am looking for the stability condition of a vector error correction model (VECM).

I have found this phrase:

the companion matrix of a VECM with 𝐾 endogenous variables and 𝑟 cointegrating equations has 𝐾 − 𝑟 unit eigenvalues. If the process is stable, the moduli of the remaining 𝑟 eigenvalues are strictly less than one.

Is this the correct condition? If so, could anyone tell me how we define "the companion matrix of a VECM"? Is it the coefficient matrix of X_(t-1) ?

In the end, how could I test this condition in R? Is there a package to do this?