可以用FinTS包里的Acf()函数吧。
Acf(x, lag.max = NULL,
type = c("correlation", "covariance", "partial"),
plot = TRUE, na.action = na.fail, demean = TRUE, ...)
画出来的话——
plot(x, ci = 0.95, type = "h", xlab = "Lag", ylab = NULL,
ylim = NULL, main = NULL,
ci.col = "blue", ci.type = c("white", "ma"),
max.mfrow = 6, ask = Npgs > 1 && dev.interactive(),
mar = if(nser > 2) c(3,2,2,0.8) else par("mar"),
oma = if(nser > 2) c(1,1.2,1,1) else par("oma"),
mgp = if(nser > 2) c(1.5,0.6,0) else par("mgp"),
xpd = par("xpd"), cex.main = if(nser > 2) 1 else par("cex.main"),
verbose = getOption("verbose"), acfLag0=FALSE,
...)
其中 demean = TRUE,是用 (x-mean(x)) 代替x,得到交叉滞后ACF
我算抛砖引玉吧,如果有更多信息,大家可能会有更确切的办法。