Learn R Programming

wavethresh (version 4.6.1)

denplot: Calculate plotting information for a density estimate.

Description

Calculates plotting information for a wavelet density estimate from high level scaling function coefficients.

Usage

denplot(wr, coef, nT=20, lims, n=50)

Arguments

wr
Scaling function coefficients, usually at some high level and usually smoothed (thresholded).
coef
The output from denproj for this analysis, i.e. the object containing the empirical scaling function coefficients. This is required because of the information it contains about the wavelet filter used, the
lims
Vector containing the minimum and maximum x values required on the plot.
nT
The number of iterations to be performed in the Daubechies-Lagarias algorithm, which is used to evaluate the scaling functions of the specified wavelet basis at the plotting points.
n
The number of points at which the density estimate is to be evaluated.

Value

  • A list with components:
  • xThe points at which the density estimate is evaluated.
  • yThe values of the density estimate at the points in x.

Details

The density estimate is evaluated at n points between the values in lims. This function can be used to plot the empirical scaling function density estimate by entering wr=coef$coef, but since the empirical coefficients are usually found at some very high resolution, such a plot will be very noisy and not very informative. This function will be of much more use as and when thresholding function are included in this density estimation package.

See Also

denproj,rclaw

Examples

Run this code
# Simulate data from the claw density and find the 
# empirical scaling function coefficients at a lowish resolution and plot
# the resulting density estimate
data <- rclaw(100)
datahr <- denproj(data, J=3, filter.number=2,family="DaubExPhase")
datapl <- denplot(datahr$coef, datahr, lims=c(-3,3), n=1000)
plot(datapl, type="l")

Run the code above in your browser using DataLab