#
# Generate some test data
#
test.data <- example.1()$y
if (FALSE) ts.plot(test.data)
#
# Generate some noisy data
#
ynoise <- test.data + rnorm(512, sd=0.1)
##
# Plot it
#
if (FALSE) ts.plot(ynoise)
#
# Now take the discrete multiple wavelet transform
# N.b. I have no idea if the default wavelets here are appropriate for
# this particular examples.
#
ynmwd <- mwd(ynoise)
if (FALSE) plot(ynwd)
# [1] 2.020681 2.020681 2.020681 2.020681 2.020681 2.020681 2.020681
#
# Now do thresholding. We'll use the default arguments.
#
ynmwdT <- threshold(ynmwd)
#
# And let's plot it
#
if (FALSE) plot(ynmwdT)
#
# Let us now see what the actual estimate looks like
#
ymwr <- wr(ynmwdT)
#
# Here's the estimate...
#
if (FALSE) ts.plot(ywr1)
Run the code above in your browser using DataLab