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

Fig9.10n <- function(k1 = 32, k2 = 42)
{
                                        # k1 and k2 are translation amounts
#  postscript(file = "Fig9.10.ps", horiz = F, height = 4.5, width = 3.5)
  par(mfrow = c(3, 1), mar = c(1.5, 1.5, 1.5, 0), mgp = c(5, 0.4, 0))
  rs <- c(57, 14, 55, 51, 30, 0, 53, 44, 34, 53, 49, 2)
  .Random.seed <- rs
  x <- (1:128)/128
  unshft <- c(rep(1, 64), rep(-1, 64))
  noise <- rnorm(128)
                                        # ORIGINAL ESTIMATOR
  y <- 2 * unshft + noise
  plot(x, y, type = "l")
  yest <- wr(threshold(wd(y, filter.number = 1), levels = 0:6))
  lines(x, yest)
                                        # FIRST TRANSLATED ESTIMATOR
  if(k1 == 0)
    y1 <- y
  else y1 <- c(y[(1 + k1)
                 :128], y[1:k1])
  if(k1 == 0)
    shft1 <- unshft
  else
    shft2 <- c(unshft[(1 + k1):128], unshft[1:k1])
  plot(x, y1, type = "l")
  y1est <- wr(threshold(wd(y1, filter.number = 1), levels = 0:6))
  lines(x, y1est)
                                        # SECOND TRANSLATED ESTIMATOR
  if(k2 == 0)
    y2 <- y
  else y2 <- c(y[(1 + k2):128], y[1:k2])
  if(k2 == 0)
    shft2 <- unshft
  else
    shft2 <- c(unshft[(1 + k2):128], unshft[1:k2])
  plot(x, y2, type = "l")
  y2est <- wr(threshold(wd(y2, filter.number = 1), levels = 0:6))
  lines(x, y2est)
#  graphics.off()
  NULL
}