# NOT RUN {
# a bivariate series example with same grids
# simulate data, e.g. two sinusoids
dat <- seq(from=1, to=3, by=0.1)
x1 <- cumsum(sample(dat, 200, TRUE))
y1 <-sin(2*pi*(1/25)*x1) + sin(2*pi*(1/50)*x1)+ 1*sin(2*pi*(1/10)*x1)+ rnorm(length(x1), 0,0.2)
y3 <- c(sin(2*pi*(1/25)*x1[1:100]),sin(2*pi*(1/25)*x1[97:196]))+ rnorm(length(x1), 0,0.1)
# }
# NOT RUN {
y1y3.dec<-cnlt.biv(x1, f1=y1, f2=y3, P = 500)
# the complex detail coefficients corresponding to the first timepoint are:
y1y3.dec$det1[[1]]
# }
# NOT RUN {
# a bivariate series example with different grids
# load some data in
data(Baidu)
data(Google)
# }
# NOT RUN {
BaiGoo<-cnlt.biv(Baidu$Seconds[1:100], Google$Seconds[1:100], Baidu$Return[1:100],
Google$Return[1:100], P = 500)
# now look at some of the coefficients from the decomposition
# (the complex detail coefficients corresponding to the first timepoint:
BaiGoo$det1[[1]]
BaiGoo$det2[[1]]
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab