\HeaderA{test.data}{Test functions for wavelet regression and thresholding}{test.data}
\keyword{manip}{test.data}
\begin{Description}\relax
This function evaluates the "blocks", "bumps", "heavisine" and "doppler" test functions of Donoho \& Johnstone (1994b) and the piecewise polynomial test function of Nason \& Silverman (1994). The function also generates data sets consisting of the specified function plus uncorrelated normally distributed errors.
\end{Description}
\begin{Usage}
\begin{verbatim}
test.data(type = "ppoly", n = 512, signal = 1, rsnr = 7, plotfn = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{type}] Test function to be computed. Available types are "ppoly" (piecewise polynomial), "blocks", "bumps", "heavi" (heavisine), and "doppler".
\item[\code{n}] Number of equally spaced data points on which the function is evaluated.
\item[\code{signal}] Scaling parameter; the function will be scaled so that the standard deviation of the data points takes this value.
\item[\code{rsnr}] Root signal-to-noise ratio. Specifies the ratio of the standard deviation of the function to the standard deviation of the simulated errors.
\item[\code{plotfn}] If \code{plotfn=TRUE}, then the test function and the simulated data set are plotted.
\end{ldescription}
\end{Arguments}
\begin{Value}
A list with the following components: 

\begin{ldescription}
\item[\code{x}] The points at which the test function is evaluated.
\item[\code{y}] The values taken by the test function.
\item[\code{ynoise}] The simulated data set.
\item[\code{type}] The type of function generated, identical to the input parameter type .
\item[\code{rsnr}] The root signal-to-noise ratio of the simulated data set, identical to the input parameter rsnr .
\end{ldescription}
\end{Value}
\begin{Section}{SIDE EFFECTS}
If \code{plotfn=TRUE}, the test function and data set are plotted.
\end{Section}

