Reputation: 115
I have a data frame (df) with two variables where having already found out my order requires 5 lags I then tested the mean vector of the differenced series to see if I needed to consider (i) intercept (ii) no intercept and (iii) intercept and a time trend.
adfTest(df[,1], lags = 5, type = "c") # p-value 0.94
adfTest(df[,1], lags = 5, type = "nc") # p-value 0.91
adfTest(df[,1], lags = 5, type = "ct") # p-value 0.04
adfTest(df[,2], lags = 5, type = "c") # p-value 0.96
adfTest(df[,2], lags = 5, type = "nc") # p-value 0.19
adfTest(df[,2], lags = 5, type = "ct") # p-value 0.74
(1) From the above p-values I can see that for my first series I should use an intercept and a time trend, but this is not the case for my second series. Is this an issue? (When I then used ca.jo test I found the presence of cointegration when I included an intercept and trend, but when I did not include a trend cointegration was then unsuccessful.)
I then conducted an eigenvalue cointegration test with trend:
cointest <- ca.jo(cointest, K = 5, type = "eigen", ecdet = "trend", spec = "transitory")
Where the critical values for r=0 resulted in rejecting the null of no cointegration.
This gave me the linear combination coefficients of:
(2) How do I form a linear combination of these series? I attempted the below code but I do not think it is correct.
s = 1.000*df$df[,1]+ 0.1418577*df$df[,2] - 15.760349**as.numeric(rownames(df)) # so the trend will decrease by 15.7 for each row
plot(s, type="l")
Upvotes: 1
Views: 526
Reputation: 332
From Wikipedia
The null hypothesis for the "maximum eigenvalue" test is as for the trace test but the alternative is r=r*+1 and, again, testing proceeds sequentially for r*=1,2,etc., with the first non-rejection used as an estimator for r.
So if you can´t reject the H0 for r=0 then there should be no cointegration relationship.
Update I can´t give you a full answer but maybe my first thoughts:
It seems as df[,1] is trend stationary. Therefore I´m not sure if this timeseries is I(1) and fulfills the "conditions" of a VECM. If not it´s getting even more complicated. See Peseran 2001
Maybe it is a good idea to check the stationarity with other tests aswell to be on the safe side. (PP-Test, KPSS, etc)
Also you could use the second test of ca.jo
type="trace
.
Depending your specific "trend" question I´m not sure and would also be interested in an answer ;)
Upvotes: 0