• Home»
• All»
• Cointegration Primer II

# Cointegration Primer II

Here we generate and test a number of series with different integration order I(n) and polynomial order O(n). The test is the Augmented Dickey Fuller test, one of the most well known of the unit root tests. Beenstock used three tests, because the tests for unit roots are known to have low power.

The six series shown above are as follows (black, red, green):

In the first group is a random series I(0), the integrated random series I(1), and the twice integrated random series I(2).

The second group is a linear trend plus noise O(1), a quadratic trend plus noise O(2), and a cubic trend plus noise O(3).

The way I diagnose order is like the code below returning the number of differences before the adf.test rejects (adf.test is in R package tseries).

for (n in 0:2)
{
if (d<0.05) return n
x<-diff(x)
}

The result for the 6 series: [1] 0 1 2 0 0 1

The first 5 were guessed right, but the cubic series is a false positive. Note that even when I use a highly curved function such as the sixth power or exponential I still get I(1).

This reaction to curvature is I guess the reason that Beenstock examine the rfCO2 for breaks. They found that rfCO2 was I(2), but also showed signs of being I(1) with a break. On the basis of another test they reject that possibility.

Next, some real data.

• http://www.moyhu.blogspot.com Nick Stokes

David, the problem with this test, and with B&R, is there is no quantification of the strength of the conclusion. You eventually want to say – these two series have incompatible I(n) status so AGW is falsified. But you need to answer, if they have compatible status, what is the probability that what you observed arose by chance? You'd want to show that that is small.I just don't see that here. You could have two almost identical series, one just squeaking through the ADF test for I(1), one not. So you'd say they were incompatible?

• davids99us

Nick, I have no doubt such a test is possible. I am not too sure thatis not contained in the rejection levels as stated. I am havingenough trouble understanding the implications of the existing work asit is.This idea if incompatability by order of integration is prettyprofound, and novel in system identification AFAIK. It would seem tome that it is also indicative of causal direction: ie from low tohigh. Perhaps they do not pay much attention to causation ineconomics. Anyway, if order incompatability is so important, then thetest should be more watertight. But I haven't read all theliterature.I read some of the earlier Kaufmann papers and found them fairly opaque.

• http://www.moyhu.blogspot.com Nick Stokes

I am not too sure that is not contained in the rejection levels as stated. I am sure. Your adf test isif (d<0.05) return nSo if with n=1, Temp returns 0.0499 and CO2 returns 0.0501, you'd say AGW is refuted?

• davids99us

I mean the way Beenstock does it, not me.

• http://www.moyhu.blogspot.com Nick Stokes

David, the problem with this test, and with B&R, is there is no quantification of the strength of the conclusion. You eventually want to say – these two series have incompatible I(n) status so AGW is falsified. But you need to answer, if they have compatible status, what is the probability that what you observed arose by chance? You’d want to show that that is small.

I just don’t see that here. You could have two almost identical series, one just squeaking through the ADF test for I(1), one not. So you’d say they were incompatible?

• Anonymous

Nick, I have no doubt such a test is possible. I am not too sure that
is not contained in the rejection levels as stated. I am having
enough trouble understanding the implications of the existing work as
it is.

This idea if incompatability by order of integration is pretty
profound, and novel in system identification AFAIK. It would seem to
me that it is also indicative of causal direction: ie from low to
high. Perhaps they do not pay much attention to causation in
economics. Anyway, if order incompatability is so important, then the
test should be more watertight. But I haven’t read all the
literature.

I read some of the earlier Kaufmann papers and found them fairly opaque.

• http://www.moyhu.blogspot.com Nick Stokes

I am not too sure that is not contained in the rejection levels as stated.
if (d<0.05) return n
So if with n=1, Temp returns 0.0499 and CO2 returns 0.0501, you’d say AGW is refuted?

• Anonymous

I mean the way Beenstock does it, not me.

• Anonymous

Nick, If 5% of Temp is wrongly diagnosed, and 5% of CO2, the 95% of
each are correctly diagnostd. The probability of getting them both
right is 95×95 or 90%.If you are worried about a 10% error rate, just
test them at a higher level. 99% will give a probability of being
right of 98%.

• http://www.moyhu.blogspot.com Nick Stokes

If 5% of Temp is wrongly diagnosed, and 5% of CO2,
No, that’s not what the result says. One is a rejection at 5%, the other is a non-rejection. If you go to 99% they will both pass (I(2) on your test), at 90% they are both I(1).

That’s what’s lacking – a quantitative measure of incompatibility.

• Anonymous

Both have 5% rejections, just at different levels.

• http://www.moyhu.blogspot.com Nick Stokes

The I(2) level test is irrelevant, as it only determines whether CO2 is I(2) or I(3) – both would be incompatible. It’s the n=1 test that decides the compatibility issue.

• davids99us

Nick, If 5% of Temp is wrongly diagnosed, and 5% of CO2, the 95% ofeach are correctly diagnostd. The probability of getting them bothright is 95×95 or 90%.If you are worried about a 10% error rate, justtest them at a higher level. 99% will give a probability of beingright of 98%.

• http://www.moyhu.blogspot.com Nick Stokes

If 5% of Temp is wrongly diagnosed, and 5% of CO2, No, that's not what the result says. One is a rejection at 5%, the other is a non-rejection. If you go to 99% they will both pass (I(2) on your test), at 90% they are both I(1).That's what's lacking – a quantitative measure of incompatibility.

• davids99us

Both have 5% rejections, just at different levels.

• http://www.moyhu.blogspot.com Nick Stokes

The I(2) level test is irrelevant, as it only determines whether CO2 is I(2) or I(3) – both would be incompatible. It's the n=1 test that decides the compatibility issue.

• dewittpayne

Your noise to signal is too high in your polynomial examples. I created a series where y=0.01x^2 +Z(x) where x=1 to 100 and a vector Z created by rnorm(100) with the default mean of 0 and an s.d.of 1. That series tests I(1) by adf.test. The p value for the original series is 0.99 and less than 0.01 for the first difference. OTOH, if the series is 0.001x^2 with the same range for Z, the p value for the test of the original series is 0.14. For the series y=0.0001x^2 plus the same Z, the adf.test p value is less than 0.01. Yet more evidence that the integration order test used by B&R is showing the difference in signal to noise for the temperature anomaly compared to rfCO2, not the real integration order, whatever it is. I'll try to write all this up. How do I send it and in what form do you want it? I can do Word with either separate or embedded figures or both.

• davids99us

However suits you. You should check you are doing trend stationary tests and run Phillips-Perron (and KPSS) tests too.

• Anonymous

Your noise to signal is too high in your polynomial examples. I created a series where y=0.01x^2 +Z(x) where x=1 to 100 and a vector Z created by rnorm(100) with the default mean of 0 and an s.d.of 1. That series tests I(1) by adf.test. The p value for the original series is 0.99 and less than 0.01 for the first difference. OTOH, if the series is 0.001x^2 with the same range for Z, the p value for the test of the original series is 0.14. For the series y=0.0001x^2 plus the same Z, the adf.test p value is less than 0.01. Yet more evidence that the integration order test used by B&R is showing the difference in signal to noise for the temperature anomaly compared to rfCO2, not the real integration order, whatever it is. I’ll try to write all this up. How do I send it and in what form do you want it? I can do Word with either separate or embedded figures or both.

• Anonymous

However suits you. You should check you are doing trend stationary tests and run Phillips-Perron (and KPSS) tests too.

• dewittpayne

Your noise to signal is too high in your polynomial examples. I created a series where y=0.01x^2 +Z(x) where x=1 to 100 and a vector Z created by rnorm(100) with the default mean of 0 and an s.d.of 1. That series tests I(1) by adf.test. The p value for the original series is 0.99 and less than 0.01 for the first difference. OTOH, if the series is 0.001x^2 with the same range for Z, the p value for the test of the original series is 0.14. For the series y=0.0001x^2 plus the same Z, the adf.test p value is less than 0.01. Yet more evidence that the integration order test used by B&R is showing the difference in signal to noise for the temperature anomaly compared to rfCO2, not the real integration order, whatever it is. I'll try to write all this up. How do I send it and in what form do you want it? I can do Word with either separate or embedded figures or both.

• davids99us

However suits you. You should check you are doing trend stationary tests and run Phillips-Perron (and KPSS) tests too.