### This is S-Plus code for the SOI data soi <- scan("soi.dat") rec <- scan("recruit.dat") motif() par(mfrow=c(2,1)) tsplot(soi) tsplot(rec) motif() acf(cbind(soi,rec)) # ACFs and CCF motif() pairs.default(cbind(soi,rec)) # scatter plot matrix # Regr one series on another [rec(t) on soi(t-6)] x1 <- rts(soi) x2 <- rts(rec) u <- ts.intersect(lag(x2,6), x1) #col 1 of u is rec(t+6), col 2 is soi(t) cor(u) fit <- lm(u[,1]~u[,2]) summary(fit)