threshold.imwd: Threshold two-dimensional wavelet decomposition object

threshold.imwdR Documentation

Threshold two-dimensional wavelet decomposition object

Description

This funcion provides various ways to threshold a imwd class object. It contains a minor variation of the equivalent WaveThresh function, which is necessary for the LS2W package.

Usage

## S3 method for class 'imwd'
threshold(x, levels = 3:(x$nlevels - 1), type = "hard", policy = "universal", 
by.level = FALSE, value = 0, dev = var, verbose = FALSE, 
return.threshold = FALSE, compression = TRUE, Q = 0.05, ...)

Arguments

x

The two-dimensional wavelet decomposition object that you wish to threshold.

levels

a vector of integers which determines which scale levels are thresholded in the decomposition. Each integer in the vector must refer to a valid level in the imwd object supplied. This is usually any integer from 0 to nlevels(wd)-1 inclusive. Only the levels in this vector contribute to the computation of the threshold and it application.

type

Determines whether the type of thresholding is "hard" or "soft".

policy

selects the technique by which the threshold value is selected. Each policy corresponds to a method in the literature. At present the different policies are: "universal", "manual", "fdr", "probability".

by.level

If FALSE then a global threshold is computed on and applied to all scale levels defined in levels. If TRUE a threshold is computed and applied separately to each scale level.

value

This argument conveys the user supplied threshold. If the policy="manual" then value is the actual threshold value; if policy="probability" then value conveys the the user supplied quantile level.

dev

This argument supplies the function to be used to compute the spread of the absolute values coefficients. The function supplied must return a value of spread on the variance scale (i.e. not standard deviation) such as the var() function. A popular, useful and robust alternative is the madmad function.

verbose

If TRUE then the function prints out informative messages as it progresses.

return.threshold

If this option is TRUE then the actual value of the threshold is returned. If this option is FALSE then a thresholded version of the input is returned.

compression

If this option is TRUE then this function returns a comressed two-dimensional wavelet transform object of class imwdc. This can be useful as the resulting object will be smaller than if it was not compressed. The compression makes use of the fact that many coefficients in a thresholded object will be exactly zero. If this option is FALSE then a larger imwd object will be returned.

Q

Parameter for the false discovery rate "fdr" policy.

...

There are no other arguments for this function!

Value

An object of class imwdc if the compression option above is TRUE, otherwise a imwd object is returned. In either case the returned object contains the thresholded coefficients. Note that if the return.threshold option is set to TRUE then the threshold values will be returned rather than the thresholded object.

Author(s)

Idris Eckley and Guy Nason

References

Please refer to the equivalent wavethresh help page.

Guy Nason (2010). wavethresh: Wavelets statistics and transforms. R package version 4.5. URL http://CRAN.R-project.org/package=wavethresh

See Also

imwd


LS2W documentation built on Nov. 2, 2022, 1:06 a.m.