Re: [R] How to analyse and model 2 time series, when one series needs to be differenced?

2009-02-01 Thread Bernardo Rangel Tura
On Mon, 2009-01-26 at 08:52 +, 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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] How to analyse and model 2 time series, when one series needs to be differenced?

2009-01-26 Thread Andreas Klein
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.




__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.