Hi all.
There's a bug in plot.acf, when plotting acf for multivariate time series.
Here a reproducible example:

X <- rnorm(1000)
Y <- -X + rnorm(1000, sd=0.6)
Z <- cbind(X,Y)

In
acf(Z)
cross-correlation plot y-axis is limited to 0-1. But:
acf(Z, ylim=c(-1,1))
shows that there was a negative correlation, that was cut away in the
previous plot.

I've seen the error is trivial. There's something like:

for(each pair of univariate time series) {
if(is.null(ylim)) {
...#set ylim properly
}
...
}

in plot.acf code, so that in the first iteration the ylim par is properly
set to about c(0,1), but in
subsequent interations, ylim is no more NULL, and the old, unproper ylim
specification
remains.

Antonio, Fabio Di Narzo.

P.S. Sorry for not indicating exact source lines, but from this PC I don't
have access to
R sources...

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to