|
Essential Wavelets for Statistical Applications and Data Analysis R.T. Ogden, University of South Carolina 0-8176-3864-4 * 1996 * $40.00 * Hardcover * 285 pages * 40 Illustrations |
Fig8.2n <- function()
{
# postscript(file = "Fig8.2.ps", horizontal = F, width = 6.5, height = 6.5)
par(mfrow = c(2, 2), mar = c(1.5, 1.5, 1.5, 0.5), mgp = c(5, 0.4, 0))
x <- (1:2048)/2048
f <- fblocks(x)
ssig <- sqrt(var(f))
f <- ((f - mean(f)) * 5)/ssig
rs <- c(57, 14, 55, 51, 30, 0, 53, 44, 34, 53, 49, 2)
.Random.seed <- rs
fnoise <- f + rnorm(2048)
fwd <- wd(fnoise, filter.number = 5)
plot(x, f, type = "l")
mtext(side = 3, line = 0.1, "True function")
plot(x, fnoise, type = "l")
mtext(side = 3, line = 0.1, "Noisy observations")
fwdsure <- threshdon(fwd)
plot(x, wr(fwdsure), type = "l")
mtext(side = 3, line = 0.1, "SURE estimator")
fwdhyb <- threshhyb(fwd, lowlev = 2, seed = rs)
plot(x, wr(fwdhyb), type = "l")
mtext(side = 3, line = 0.1, "SURE hybrid estimator")
# graphics.off()
NULL
}
fblocks <- function(x)
{
n <- length(x)
t <- c(0.1, 0.13, 0.15, 0.23, 0.25, 0.4, 0.44, 0.65, 0.76, 0.78, 0.81)
h <- c(4, -5, 3, -4, 5, -4.2, 2.1, 4.3, -3.1, 2.1, -4.2)
f <- rep(0, n)
i <- 1
while(i <= 11) {
ind <- ceiling(t[i] * n)
f[ind:n] <- f[ind:n] + h[i]
i <- i + 1
}
f
}