[R] Cross-correlation between two time series data
Spencer Graves
spencer.graves at pdf.com
Mon Sep 4 18:05:12 CEST 2006
'ccf' provides a plot with red, dashed lines indicating an
approximate 95% threshold for the correlation.
Beyond that, with any particular model fit, you can get confidence
intervals and anova tests for any particular parameter estimated.
If neither of these are adequate, I suppose one might be able to
try Markov Chain Monte Carlo, but I've never used that, so I can't
comment further on that.
If you would like more help from this listserve, please provide
more detail of your application including commented, minimal,
self-contained, reproducible code, explaining something you've tried and
why it is not adequate (as suggested in the posting guide
"www.R-project.org/posting-guide.html").
Hope this helps.
Spencer Graves
Juni Joshi wrote:
> Hi all,
>
> I have two time series data (say x and y). I am interested to
> calculate the correlation between them and its confidence interval (or
> to test no correlation). Function cor.test(x,y) does the test of no
> correlation. But this test probably is wrong because of autocorrelated
> data.
>
> ccf() calculates the correlation between two series data. But it does
> not provide the confidence intervals of cross correlation. Is there
> any function that calculates the confidence interval of correlation
> between two time series data or performs the test of no correlation
> between two time series data.
>
> Thanks.
>
> Jun
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
More information about the R-help
mailing list