Johansen cointegration test with structural change in the intercept I built a VAR in which I discovered that structural change in the intercept so I added a dummy variable as differential intercept. I want to test cointegration by Johansen method and have read that the critical values of trace statistic should be re-calculated because normal critical values of Johansen can not be used due to the introduction of the dummy variable. Is this correct. Please can someone explain me how to re-calculate the critical values.
Thanks for the help.
 A: To explain how this is done presumes that you know how the asymptotic tables for the rank test are simulated in the first place and to explain this takes a considerable amount of space. Therefore I will give really quick explanation of what is going on and the give you some references where you can read up on this issue.
The following is based on The Cointegrated VAR Model: Methodology and Application, part 8.2. Basically we can simulate the asymptotic tables for the rank of the model by simulating the distribution of:
$\sum_{i=1}^{p}\lambda_{i}\approx trace\left(\mathbf{S_{11}^{-1}}\mathbf{S_{10}S_{01}}\right)=trace\left(\mathbf{S_{01}S_{11}^{-1}S_{10}}\right)$
by generating a $\left(p-r\right)
 $ dimensional random walk of a certain length and then replicate this a large number of times in order to approximate a brownian motion. In order to see why the asymptotic tables depend on the deterministic terms and whether or not these are restricted to the cointegrating space or not is to see how $\mathbf{S_{11}}$, $\mathbf{S_{01}}$ and $\mathbf{S_{10}}$ are defined:
$\mathbf{S_{11}}=\frac{1}{T}\sum_{t=1}^{T}\mathbf{R_{1,t}R_{1,t}^{\prime}}$
$\mathbf{S_{01}}=\frac{1}{T}\sum_{t=1}^{T}\mathbf{R_{0,t}R_{1,t}^{\prime}}$
$\mathbf{S_{00}}=\frac{1}{T}\sum_{t=1}^{T}\mathbf{R_{0,t}R_{0,t}^{\prime}}$ 
Where $\mathbf{R_{1,t}}=x_{t-1}-\hat{b}_{10}-\hat{b}_{11}t$ and $\mathbf{R_{0,t}}=\Delta x_{t}-\hat{b}_{00}-\hat{b}_{01}t$ are the residual from the auxilliary regressions of $x_{t-1}$ and $\Delta x_{t}$:$\Delta x_{t}=\alpha\beta^{\prime}x_{t-1}+\mu_{0}+\mu_{1}t+\varepsilon_{t}$ and where $\mu_{0}$ and $\mu_{1}$ can be decomposed into $\mu_{0}=\alpha\beta_{0}+\gamma_{0}$ and $\mu_{1}=\alpha\beta_{1}+\gamma_{1}
 $ i.e. a part which is restricted to the cointegrated space and one which is unrestricted. The problem of including deterministic terms and dummy variables is that the definition of $\mathbf{R_{1,t}}$ and $\mathbf{R_{0,t}}$ will change. For instance if $\mu_{0}=\mu_{1}=0$ which is the case when we have no deterministic components in the model we'll get:
$\mathbf{R_{1,t}}=\left[\begin{array}{c}
\sum_{i=1}^{t-1}\varepsilon_{1i}\\
\sum_{i=1}^{t-1}\varepsilon_{2i}\\
\sum_{i=1}^{t-1}\varepsilon_{3i}
\end{array}\right]
 $
and
$\mathbf{R_{0,t}}=\left[\begin{array}{c}
\varepsilon_{1t}\\
\varepsilon_{2t}\\
\varepsilon_{3t}
\end{array}\right]$ 
but in the case where $\mu_{0}\neq0$, $\gamma_{0}=0$, $\beta_{0}\neq0$ and $\mu_{1}=0$ we get:
$\mathbf{R_{1,t}}=\left[\begin{array}{c}
\sum_{i=1}^{t-1}\varepsilon_{1i}\\
\sum_{i=1}^{t-1}\varepsilon_{2i}\\
\sum_{i=1}^{t-1}\varepsilon_{3i}\\
1
\end{array}\right]
 $ and $\mathbf{R_{0,t}}=\left[\begin{array}{c}
\varepsilon_{1t}\\
\varepsilon_{2t}\\
\varepsilon_{3t}
\end{array}\right]
 $ 
It should be clear that we have to simulate new asymptotic tables depending on how the trend, constant and dummies are included in the model.
See The Cointegrated VAR Model: Methodology and Application, part 8.2 and 8.3 for more examples or Likelihood-Based Inference in Cointegrated Vector Autoregressive Models, Chapt. 11 for an even more detailed explanation.
The Cointegrated VAR Model: Methodology and Application does not explicitly discuss/give an example of the simulation problem when dummies are included but gives three papers for reference (part 8.3): Cointegration analysis in the presence of structural breaks in the deterministic trend, Inference in Cointegrating Models: UK M1 Revisited and Cointegration analysis in the presence of outliers.
You can also look at some newer papers which determine the cointegration rank using bootstrapping and how they deal with problem of deterministic terms. See for instance: Bootstrap Testing of Hypotheses on Co-Integration Relations in Vector Autoregressive Models.
The last comment I have is that if you have access to CATS in RATS (you'll need both CATS and RATS) you can simulate these asymptotic tables very easily for many different specifications of trend, dummies and constant. So if you have access to this program or are planning on working extensively with cointegration analysis (the CVAR model) I would recommend you to buy this package. It was made for CVAR analysis and has many function which you won't find in R and other packages.
If this did not answer your question then let me know so I can amend my answer.
