WaveThresh
Help
plotdenwd
Plot the wavelet coefficients of a p.d.f.
DESCRIPTION
Plots the wavelet coefficients of a density function.
USAGE
plotdenwd(wd, first.level=0, top.level=wd$nlevels-1, main="Wavelet Decomposition Coefficients", scaling="global", rhlab=F, NotPlotVal=0.005)
REQUIRED ARGUMENTS
- wd
- Wavelet decomposition object, usually output from
denwd, possibly thresholded.
OPTIONAL ARGUMENTS
- first.level
- This specifies how many of the course levels of coefficients are omitted
from the plot. The default value of 0 means that all levels are plotted.
- top.level
- This tells the plotting rountine the true resolution level of the finest
level of coefficients. The default results in the coarsest level being
labelled 0. The "correct" value can be determined from the empirical
scaling function coefficient object (output from
denproj) as in the example below.
- main
- The title of the plot.
- scaling
- The type of scaling applied to levels within the plot. This can be
"compensated", "by.level" or "global". See
plot.wd for further details.
- rhlab
- Determines whether the scale factors applied to each level before plotting
are printed as the right hand axis.
- NotPlotVal
- If the maximum coefficient in a particular level is smaller than
NotPlotVal, then the level is not plotted.
VALUE
Axis labels to the right of the picture (scale factors). These are returned as
they are sometimes hard to read on the plot.
DETAILS
Basically the same as
plot.wd
except that it copes with the zero boundary conditions used in density
estimation. Note that for large filter number wavelets the high level
coefficients will appear very squashed compared with the low level
coefficients. This is a consequence of the zero boundary conditions and the
use of the convention that each coefficient is plotted midway between two
coefficients at the next highest level, as in
plot.wd.
SEE ALSO
`denproj',
`plot.wd',
`denwd'
# Simulate data from the claw density, find the empirical
# scaling function coefficients, decompose them and plot
# the resulting wavelet coefficients
data <- rclaw(100)
datahr <- denproj(data, J=8, filter.number=2, family="DaubExPhase")
data.wd <- denwd(datahr)
plotdenwd(data.wd, top.level=(datahr$res$J-1))
# Now use a smoother wavelet
datahr <- denproj(data, J=8, filter.number=10, family="DaubLeAsymm")
data.wd <- denwd(datahr)
plotdenwd(data.wd, top.level=(datahr$res$J-1))
AUTHOR
David Herrick