Example: Bivariate Time Series The time series object econ.cts contains the following three time series: Oneyear: One-Year U.S. Treasury Constant Maturity Rates Tenyear: Ten-Year U.S. Treasury Constant Maturity Rates Prod: U.S. Industrial Production Index, Seasonally Adjusted. Goal: Describe the joint structure of the Ten-Year Maturity Rates and the Industrial Production Index. First, plot all three series. Splus can put them all on one plot: > par(mfrow=c(3,3)) > tsplot(econ.cts) But the scales aren't similar. Let's do two plots: > tsplot(econ.cts[,1:2]) # One-Year (econ.cts[,1]) and Ten-Year > tsplot(econ.cts[,3]) # Production Index What do plots suggest? > econ.diff <- diff(econ.cts,1,1) # First difference of all 3 series > tsplot(econ.diff[,2],title="10-year rates: 1st diff") > mtext("10-year rates: 1st diff",cex=0.7) > tsplot(econ.diff[,3]) > mtext("Production Index: 1st diff",cex=0.7) Find ACF's of Ten-Year Rates and Production Index, along with CCF > acf(econ.diff[,2:3]) Periodograms of Ten-Year Rates and Production Index, along with the cross-spectrum information > spec.econ <- spec.pgram(econ.diff[,2:3], demean=T, span=c(5,9)) > summary(spec.econ) # some information removed Length Class Mode freq 85 numeric spec 170 numeric coh 85 numeric # Coherency phase 85 numeric # Phase > dim(spec.econ$spec) [1] 85 2 # spec is an 85 x 2 matrix. First columns is periodogram of # 10-year rates. Second column is periodogram of production. > spec.plot(spec.econ) # Periodograms > plot(spec.econ$freq,spec.econ$coh, type='l', xlab="Freq",ylab="Coh") > mtext("Coherency", cex=0.7) > plot(spec.econ$freq,spec.econ$phase, type='l', xlab="Freq",ylab="Phase") > mtext("Phase", cex=0.7)