Andreas Klein
2009-Jan-26 08:52 UTC
[R] How to analyse and model 2 time series, when one series needs to be differenced?
Hello. How can I analyse the cross-correlation between two time series with ccf, if one of the time series need to be differenced, so it is stationary? The two time series differ when in length and maybe ccf produces not the correct cross-correlation?! Another problem: How can I model the two time series as an VARI-process with the dse package? - So how can I handle it, that one series has to be differenced and the other series not? I hope you can give me some hints. Regards, Andreas.
Bernardo Rangel Tura
2009-Feb-01 08:28 UTC
[R] How to analyse and model 2 time series, when one series needs to be differenced?
On Mon, 2009-01-26 at 08:52 +0000, Andreas Klein wrote:> Hello. > > How can I analyse the cross-correlation between two time series with ccf, if one of the time series need to be differenced, so it is stationary? > The two time series differ when in length and maybe ccf produces not the correct cross-correlation?! > > Another problem: > How can I model the two time series as an VARI-process with the dse package? - > So how can I handle it, that one series has to be differenced and the other series not? > > I hope you can give me some hints. > > > Regards, > Andreas.Hi Andreas, If I understand your problem this script solve tour question t<-1:15 x<-rnorm(10) y<-.2-.3*t+rnorm(15) y.dif<-diff(y,1) ccf(x,y.dif) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil