example.1 {wavethresh} | R Documentation |
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()
Arguments
None
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.
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. |
Author(s)
G P Nason
See Also
Examples
#
# Generate the piecewise polynomial
#
test.data <- example.1()$y
## Not run: ts.plot(test.data)