> Date: Thu, 15 Feb 2001 15:48:38 +0100
> From: "Fredrik Berchtold"
> Subject: [R] cointegrating regression
>
> Hi all,
> Can I run a cointegrating regression, for example
> delta Xt=a1(Yt-1-cXt-1)+E1t
> and
> delta Yt=-b1(Yt-1-cXt-1)+E2t
> with R were
> Xt and Yt are non stationary time series at t
> a,b,c are parameters and E1t and E2t are error terms at t.
> Yt-Xt is stationary
> Any suggestions are welcome.
> Best regards,
> /fb
>
E.g., you can do that in three steps:
1. Test if x and y are cointegrated, e.g., using po.test() in tseries.
2. If cointegrated, run the regression r<-lm(y~x).
3. let z<-ts.union(diff(x),diff(y)) and xreg<-residuals(r),
xreg<-xreg[1:(length(xreg)-1)]
Run arima0(z,xreg=xreg,order=c(var.order,0,0)).
This corresponds to the so called Engle-Granger two-step procedure.
best
Adrian
--
Dr. Adrian Trapletti, Olsen & Associates Ltd.
Seefeldstrasse 233, CH-8008 Z?rich, Switzerland
Phone: +41 (1) 386 48 47 Fax: +41 (1) 422 22 82
E-mail: adrian at olsen.ch WWW: http://www.olsen.ch
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._