# NOT RUN {
## Based on data from Figure 7.8 in Gencay, Selcuk and Whitcher (2001)
## plus one random series.
library(wavemulcor)
data(exchange)
returns <- diff(log(as.matrix(exchange)))
returns <- ts(returns, start=1970, freq=12)
N <- dim(returns)[1]
wf <- "d4"
J <- trunc(log2(N))-3
set.seed(140859)
demusd.modwt <- brick.wall(modwt(returns[,"DEM.USD"], wf, J), wf)
jpyusd.modwt <- brick.wall(modwt(returns[,"JPY.USD"], wf, J), wf)
xrand.modwt <- brick.wall(modwt(rnorm(length(returns[,"DEM.USD"])), wf, J), wf)
# ---------------------------
xx <- list(demusd.modwt, jpyusd.modwt, xrand.modwt)
names(xx) <- c("DEM.USD","JPY.USD","rand")
Lst <- wave.multiple.regression(xx)
# ---------------------------
##Producing correlation plot
plot_wave.multiple.correlation(Lst)
##Producing regression plot
plot_wave.multiple.regression(Lst)
# }
Run the code above in your browser using DataLab