A bootstrap algorithm for testing cointegration rank in VAR models in the presence of stationary variables