Compute mean of residual sum of squares (RSS) for odd prediction of even
ordinates and vice versa using wavelet shrinkage with a specified threshold.
This is a subsidiary routine of the WaveletCV
cross validation function.
A version implemented in C exists called Crsswav
.
rsswav(noisy, value = 1, filter.number = 10, family = "DaubLeAsymm",
thresh.type = "hard", ll = 3)
A list with the following components
The RSS value that was computed
The dof value computed on the thresholded wavelet transform of the data with the given threshold and thresholding options. (Although this is not really used for anything).
The value argument that was specified.
the thresh.type
argument that was specified.
The vector ll:(nlevelsWT(noisy)-1)
(i.e. the levels that were thresholded).
A vector of dyadic (power of two) length that contains the noisy data that you wish to compute the averaged RSS for.
The specified threshold.
This selects the smoothness of wavelet that you want to perform wavelet shrinkage by cross-validation.
specifies the family of wavelets that you want to use. The options are "DaubExPhase" and "DaubLeAsymm".
this option specifies the thresholding type which can be "hard" or "soft".
The primary resolution that you wish to assume. No wavelet coefficients that are on coarser scales than ll will be thresholded.
G P Nason
Note: a faster C based implementation of this function called
Crsswav
is available.
It takes the same arguments and returns the same values.
Two-fold cross validation can be computed for a wd object using the "cv" policy option in threshold.wd
.
As part of this procedure for each threshold value that the CV optimisation algorithm selects a RSS value must be computed (the CV optimisation algorithm seeks to minimize this RSS value).
The RSS value computed is this. First, the even and odd indexed values are separated. The even values are used to construct an estimate of the odd true values using wavelet shrinkage with the given threshold. The sum of squares between the estimate and the noisy odds is computed. An equivalent calculation is performed by swapping the odds and evens. The two RSS values are then averaged and the average returned. This algorithm is described more fully in Nason, (1996).
Crsswav
,threshold.wd
, WaveletCV