Skip to content

CCF and missing values.

3 messages · Paul Ossenbruggen, Peter Ehlers, stoffer@pitt.edu

#
On 2011-01-19 08:48, Paul Ossenbruggen wrote:
I can see two possible solutions:
1. Use na.action = na.contiguous (see ?na.contiguous)
2. Modify ccf(). Make a copy and replace the line

   acf.out <- acf(X, lag.max = lag.max, plot = FALSE, type = type)

with

   acf.out <- acf(X, lag.max = lag.max, plot = FALSE, type = type,
                  na.action = na.action)

I think this may be a bug in ccf().

Peter Ehlers
#
combine them and then use acf:

x <- ts(rnorm(10))
y <- ts(x+ rnorm(10))
u <- ts.union(x, y)
(acf(u, na.action=na.pass))


I don't know if it's correct, but it gives an answer... I'm too afraid to
check if it's correct.