Library: | wavelet |
See also: | fwt invfwt fwt2 invfwt2 |
Quantlet: | fwttin | |
Description: | Generates the translation invariant estimate of x with automatic hardthresholding. It is well-known that nonlinear wavelet estimators are not translation-invariant: if we shift the underlying data set by a small amount, apply nonlinear thresholding and shift the estimator back, then we usually obtain an estimator different from the estimator without the shifting and backshifting operation. To get rid of this, we average over several estimators obtained by shifting, nonlinear thresholding and backshifting. |
Usage: | xs = fwttin (x, l, h) | |
Input: | ||
x | n x 1 array, input data, observed at an equispaced grid | |
l | p x 1 array, number of father wavelets | |
h | q x 1 array, wavelet basis coefficients | |
Output: | ||
xs | n x 1 array, translation invariant estimator |
; loads the wavelet library library("wavelet") ; generates an equidistant grid from 0 to 1 with 256 points t = grid(0, 2*pi./255, 256) ; computes a sine function with a normal distributed error x = 3.*sin(t)+normal(256) ; computes the translation invariant estimator xi = fwttin(x, 4, haar) ; creates a display for plotting d = createdisplay(1, 1) ; plots the original data t~x and the estimator t~xi show(d, 1, 1, t~x, t~xi)
xs hardthresholded translation invariant estimator