# Johansen test R - long term relationship covariance

I have two time series which are I(1) and co-integrated. I would like to make long term forecasts for one of the time series, given an assumed fixed value for the other. I used the Johansen test (ca.jo) to determine that they are co-integrated with the following code:

johansentest <- ca.jo(data, type = "trace", ecdet = "const", K = 2,
spec="longrun")
summary(johansentest)

######################
# Johansen-Procedure #
######################

Test type: trace statistic , without linear trend and constant in
cointegration

Eigenvalues (lambda):
[1]   2.383128e-01   4.318654e-02 -3.111158e-308

Values of teststatistic and critical values of test:

test 10pct  5pct  1pct
r <= 1 |  4.37  7.52  9.24 12.97
r = 0  | 31.32 17.85 19.96 24.60

Eigenvectors, normalised to first column:
(These are the cointegration relations)

alloy.l2     ore.l2   constant
alloy.l2    1.0000     1.0000     1.0000
ore.l2   -190.8072   -16.6844    45.4242
constant -186.8746 -1057.6472 -2959.5904

Weights W:

alloy.l2        ore.l2      constant
alloy.d 0.024466861 -4.710461e-02 -6.163682e-18
ore.d   0.001143207  5.834786e-05  1.246927e-19


Because I am interested in the long term relationship, I will not be using the associated VECM, but rather focus only on the error correction term. I can get a point estimate using the eigenvectors (johansentest@V[,1]).

My question is, how do I get an associated variance for this point estimate(to get to prediction bounds)?

Possible solutions I have thought of:

1. Get the residual between the time series and johansentest@V[,1] result for the data and get the statistics from the residual. (I would imagine this will give an overestimation of the long term relationship variance because time series values vary significantly in the data)
2. Discard the result from ca.jo all together and just use lm to get a new model (so only use ca.jo to confirm co-integration) and use the statistics of the noise term presented with the lm result.
3. Use johansentest@DELTA as the long term relationship variance (I have searched far and wide on the internet and I cannot figure out if this is the variance I am looking for, the urca documentation is very limited on what this is)

## migrated from stackoverflow.comSep 4 '18 at 9:18

This question came from our site for professional and enthusiast programmers.