This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

n = 100

### Example 1.22

w = rnorm(n,0,1)
x = w[-n] + w[-1]
y = w[-n] - w[-1]


### Example 1.23

w1 = rnorm(n,0,1)
w2 = rnorm(n,0,1)
xx = w1
#xx =  filter( w1, filter=0.98, method="recursive")
# y = xx[-(1:5)] + w2[-(1:5)]
# x = xx[1:(n-5)]



### Plot

par( mfrow=c(3,1) )
acf(x, lag.max=10 )
acf(y, lag.max=10 )
ccf( x, y, lag.max=10 )