Learn R Programming

wavethresh (version 4.7.3)

example.1: Compute and return piecewise polynomial coordinates.

Description

This function computes and returns the coordinates of the piecewise polynomial described by Nason and Silverman, 1994. This function is a useful test function for evaluating wavelet shrinkage methodology as it contains smooth parts, a discontinuity and it is periodic.

(Nason, G.P. and Silverman, B.W. (1994) The discrete wavelet transform in S, J. Comput. Graph. Statist., 3, 163--191.)

Usage

example.1()

Value

A list with two components:

x

a vector of length 512 containing the ordered x ordinates of the piecewise polynomial.

y

a vector of length 512 containing the corresponding y ordinates of the piecewise polynomial.

Arguments

None

Author

G P Nason

Details

This function computes and returns the x and y coordinates of the piecewise polynomial function described in Nason and Silverman, 1994. The formula for the piecewise polynomial (which is piecewise cubic) is given in Nason and Silverman, 1994.

The piecewise polynomial returned is a discrete sample on 512 equally spaced points between 0 and 1 (including 0 but excluding 1).

The Donoho and Johnstone test functions can be generated using the DJ.EX function.

See Also

DJ.EX

Examples

Run this code
#
# Generate the piecewise polynomial 
#
test.data <- example.1()$y
if (FALSE) ts.plot(test.data)

Run the code above in your browser using DataLab