# NOT RUN {
# obtain the two series listed in Percival and Walden (2000), page 42
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)
# combine them and compute MODWT
newX <- cbind(X1,X2)
wt <- modwt(newX, n.levels=3, boundary="reflection")
# compute the inverse MODWT
invX <- imodwt(wt)
# compare
newX
invX
# }
Run the code above in your browser using DataLab