DJ.EX: Produce Donoho and Johnstone test functions

DJ.EXR Documentation

Produce Donoho and Johnstone test functions

Description

Function to produce the blocks, bumps, Doppler and heavisine functions described by Donoho and Johnstone (1994).

Usage

DJ.EX(n=1024, signal=7, rsnr=7, noisy=FALSE, plotfn=FALSE)

Arguments

n

Number of samples of the function required.

signal

A factor that multiples the function values.

rsnr

If Gaussian noise is to be added to the functions then this argument specifies the root signal to noise ratio.

noisy

If TRUE then Gaussian noise is added to the signal so that the root signal to noise ratio is rsnr. If FALSE then just the signals are returned.

plotfn

If TRUE then a plot is produced. If FALSE no plot is produced.

Details

The Donoho and Johnstone test functions were designed to reproduce various features to be found in real world signals such as jump discontinuities (blocks), spikes (the NMR-like bumps), varying frequency behaviour (Doppler) and jumps/spikes in smooth signals (heavisine). These functions are most often used for testing wavelet shrinkage methods and comparing them to other nonparametric regression techniques. (Donoho, D.L. and Johnstone, I.M. (1994), Ideal spatial adaptation by wavelet shrinkage. Biometrika, 81, 425–455).

Another version of the Doppler function can be found in the standalone doppler function.

Another function for this purpose is the Piecewise Polynomial created in Nason and Silverman (1994) an encapsulated in WaveThresh by example.1 (Nason, G.P. and Silverman, B.W. (1994) The discrete wavelet transform in S, J. Comput. Graph. Statist., 3, 163–191.

NOTE: This function might not give exactly the same function values as the equivalent function in WaveLab

Value

A list with four components: blocks, bumps, heavi and doppler containing the sampled signal values for the four types of Donoho and Johnstone test functions. Each of these are deemed to be sampled on an equally spaced grid from 0 to 1.

Author(s)

Theofanis Sapatinas

See Also

doppler,example.1, threshold, wd

Examples

#
# Show a picture of the four test functions with the default args
#
## Not run: DJ.EX(plotfn=TRUE)

wavethresh documentation built on Nov. 16, 2022, 5:16 p.m.