Discussion:
[R] Confidence intervals in ccf()
Shruthi Jayaram
2009-01-20 17:25:51 UTC
Permalink
Hi,

I have been running the ccf() function to find cross-correlations of time
series across various lags. When I give the option of plot=TRUE, I get a
plot that gives me 95% confidence interval cut-offs (based on sample
covariances) for my cross-correlations at each lag. This gives me a sense of
whether my cross-correlations are statistically significant or not.

However, I am unable to get R to return the value of these critical values
to me in say, an object or vector form. Would anyone be able to help me
extract the critical values (at 95%) from the ccf() function?

Thanks very much in advance,

Shruthi
--
View this message in context: http://www.nabble.com/Confidence-intervals-in-ccf%28%29-tp21567646p21567646.html
Sent from the R help mailing list archive at Nabble.com.
Gad Abraham
2009-01-23 00:00:52 UTC
Permalink
Post by Shruthi Jayaram
Hi,
I have been running the ccf() function to find cross-correlations of time
series across various lags. When I give the option of plot=TRUE, I get a
plot that gives me 95% confidence interval cut-offs (based on sample
covariances) for my cross-correlations at each lag. This gives me a sense of
whether my cross-correlations are statistically significant or not.
However, I am unable to get R to return the value of these critical values
to me in say, an object or vector form. Would anyone be able to help me
extract the critical values (at 95%) from the ccf() function?
Thanks very much in advance,
Shruthi
I don't know if you can get it directly, but you can look at the code in
plot.acf using getAnywhere(plot.acf) to see how it's calculated.
--
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: gabraham at csse.unimelb.edu.au
web: http://www.csse.unimelb.edu.au/~gabraham
David Winsemius
2009-01-23 02:18:14 UTC
Permalink
ccf passes its results to acf which than passes to plot.acf, an
invisible function which can be made visible by the ":::" device:

stats:::plot.acf

plot.acf is where the CI get calculated and plotted.
--
David Winsemius
Post by Shruthi Jayaram
Hi,
I have been running the ccf() function to find cross-correlations of time
series across various lags. When I give the option of plot=TRUE, I get a
plot that gives me 95% confidence interval cut-offs (based on sample
covariances) for my cross-correlations at each lag. This gives me a sense of
whether my cross-correlations are statistically significant or not.
However, I am unable to get R to return the value of these critical values
to me in say, an object or vector form. Would anyone be able to help me
extract the critical values (at 95%) from the ccf() function?
Thanks very much in advance,
Shruthi
--
View this message in context: http://www.nabble.com/Confidence-intervals-in-ccf%28%29-tp21567646p21567646.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at 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.
Loading...