Hi everyone,

I have been working with the ccf function recently, and in particular to do my calculations I have been using "na.action = na.pass". I noticed that the help documentation mentions that with this option the computed estimate may not be a valid autocorrelation sequence and was wondering if anyone could clarify what this means.

In particular, the example below gives correlation values > 1 which seems nonsensical. When is it valid to use the "na.pass" option?

> x <- c(1,2,3,4)
> y <- c(1,2,NA,4)
> ccf(x, y, na.action = na.pass, plot = F)

Autocorrelations of series ‘X’, by lag

    -3     -2     -1      0      1      2      3
-0.448 -0.199  0.319  1.116  0.120 -0.209 -0.359

Thanks!

--

Dario Mavec (dario.ma...@anu.edu.au)
Fenner School of Environment & Society
College of Medicine, Biology & Environment
Australian National University
Canberra ACT 0200 AUSTRALIA

______________________________________________
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.

Reply via email to