In time-aligning the two series there will be missing values, and you cannot compute a ccf for series with missing values, hence the problem.
ccf(x, y, na.action=na.contiguous) works. I guess that using ts.intersect rather than ts.union would be a simple workaround for this by automatically trimming the ends. On Tue, 23 May 2006, [EMAIL PROTECTED] wrote: > This is R 2.3.0 from CRAN, windows XP. > > The following looks like a bug in ccf(): > > > x <- ts(rnorm(100), start=1) > > y <- ts(rnorm(120), start=3) > > ccf(x,y) > Erro en na.fail.default(ts.union(as.ts(x), as.ts(y))) : > missing values in object > > ccf(x,y, na.action=na.pass) > Erro en na.fail.default(as.ts(x)) : missing values in object > > > > sessionInfo() > Version 2.3.0 (2006-04-24) > i386-pc-mingw32 > > attached base packages: > [1] "methods" "stats" "graphics" "grDevices" "utils" > "datasets" "base" > > other attached packages: > zoo clim.pact akima ncdf > "1.0-6" "2.2-1" "0.5-1" "1.5" > > Kjetil > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel