## Not run:
# ## The following example is adopted from Liu et al, 2007:
#
# series.length = 6*128*24
# x1 = periodic.series(start.period = 1*24, length = series.length)
# x2 = periodic.series(start.period = 8*24, length = series.length)
# x3 = periodic.series(start.period = 32*24, length = series.length)
# x4 = periodic.series(start.period = 128*24, length = series.length)
# x = x1 + x2 + x3 + x4
#
# plot(ts(x, start=0, frequency=24), type="l",
# xlab="time (days)", ylab="hourly data",
# main="a series of hourly data with periods of 1, 8, 32, and 128 days")
#
# my.data = data.frame(x=x)
#
# my.w = analyze.wavelet(my.data, "x",
# loess.span=0,
# dt=1/24, dj=1/20,
# lowerPeriod=1/4,
# make.pval=T, n.sim=10)
#
# ## Plot of wavelet power spectrum with equidistant color breakpoints:
# wt.image(my.w, color.key="i",
# legend.params=list(lab="wavelet power levels (equidistant levels)"))
#
# ## Image of phases:
# wt.phase.image(my.w, timelab="time (days)", main = "image of phases")
# ## End(Not run)
Run the code above in your browser using DataLab