CWavDE: Simple wavelet density estimator with hard thresholding

CWavDER Documentation

Simple wavelet density estimator with hard thresholding

Description

This function implements the density estimator with hard thresholding described by Hall, P. and Patil, P. (1995) Formulae for mean integrated squared error of nonlinear wavelet-based density estimators, Ann. Statist., 23, 905-928.

Usage

CWavDE(x, Jmax, threshold=0, nout=100, primary.resolution=1, filter.number=10,
	family="DaubLeAsymm", verbose=0, SF=NULL, WV=NULL)

Arguments

x

Vector of real numbers. This is the data for which you want a density estimate for

Jmax

The maximum resolution of wavelets

threshold

The hard threshold value for the wavelet coefficients

nout

The number of ordinates in the density estimate

primary.resolution

The usual wavelet density estimator primary resolution

filter.number

The wavelet filter number, see filter.select

family

The wavelet family, see filter.select

verbose

The level of reporting performed by the function, legit values are 0, 1 or 2, with 2 being more reports

SF

Scaling function values in format as returned by draw.default

WV

Wavelet function values in format as returned by draw.default

Details

As the description.

Value

A list containing the following components:

x

A vector of length nout that covers the range of the input data x, plus some more depending on the support of the wavelet and the primary resolution.

y

A vector of length nout that contains the output wavelet density estimate

sfix

The integer values of the translates of the scaling functions used in the estimate

wvixmin

As for sfix, but a vector of length Jmax which contains the minimum integer wavelet translates

wvixmax

As for wvixmin, but with the maxima

Author(s)

G P Nason

Examples

#
# Let's generate a bi-modal artificial set of data.
#
x <- c( rnorm(100), rnorm(100, 10))
#
# Now perform simple wavelet density estimate
#
wde <- CWavDE(x, Jmax=10, threshold=1)
#
# Plot results
#
## Not run: plot(wde$x, wde$y, type="l")

wavethresh documentation built on Sept. 11, 2024, 9:33 p.m.