R Cointegration

May 26, 2010 by
Filed under: Notes 

From package tseries:

from po.test help:

x <- ts(diffinv(matrix(rnorm(2000),1000,2)))
po.test(x)
Phillips-Ouliaris Cointegration Test
data: x
Phillips-Ouliaris demeaned = -13.5288, Truncation lag parameter = 10,
p-value = 0.15
Warning message:
In po.test(x) : p-value greater than printed p-value: Fail to reject null hypothesis that there is no cointegration, i.e., not cointegrated
x <- diffinv(rnorm(1000)) y <- 2.0-3.0*x+rnorm(x,sd=5) z <- ts(cbind(x,y)) # cointegrated po.test(z) Phillips-Ouliaris Cointegration Test data: z Phillips-Ouliaris demeaned = -933.6705, Truncation lag parameter = 10, p-value = 0.01 Warning message: In po.test(z) : p-value smaller than printed p-value Reject null hypothesis that there is no cointegration, i.e., cointegrated

Comments

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!