
Dear List member I was wondering if somebody has ever implemented the Granger Gonzalo decomposition.

Following the Granger and Gonzalo paper I have tried to code it by using the result from the urca package. But it doesnt seem to work as my Permanent time series is much more volatile than the actual one.

If somebody has some idea, it would be helpful
Here is my code

library(urca)
data(denmark)
sjd <- denmark[, c("LRM", "LRY", "IBO", "IDE")]
N=nrow(sjd)

sjd.vecm1 <- ca.jo(sjd, ecdet = "const", type="eigen", K=2, spec="longrun",season=4)
a=attr(sjd.vecm1, 'V')
g=attr(sjd.vecm1, 'W')

alpha=matrix(a[,1])
gamma=matrix(g[1,])

alpha.T=eigen((alpha)%*%t(alpha))$vectors[,5:2]
gamma.T=eigen((gamma)%*%t(gamma))$vectors[,5:2]

X=cbind(sjd,rep(1,N))

A1=alpha.T%*%solve(t(gamma.T)%*%alpha.T)
A2=gamma%*%solve(t(alpha)%*%gamma)

Tt=Pt=array(rep(0,N*ncol(X)),c(N,ncol(X)))

for(i in 1:N){
    Pt[i,]=A1%*%t(gamma.T)%*%t(X[i,])
    Tt[i,]=A2%*%t(alpha)%*%t(X[i,])
}


_________________________________________________________________


e=wlmailtagline
	[[alternative HTML version deleted]]

