plot.hwtANYN: Plots the transform contained in an 'hwtANYN' object.

plot.hwtANYNR Documentation

Plots the transform contained in an hwtANYN object.

Description

An hwtANYN object contains the results of a Haar wavelet transform computed on an object of non-dyadic length. It is the equivalent of the wd object for non-dyadic vectors for Haar wavelets. Note, the plot can only be carried out where the reindex slot of the object is TRUE.

Usage

## S3 method for class 'hwtANYN'
plot(x, xlabvals, xlabchars, ylabchars, first.level = 1,
    main = "Haar Wavelet Coefficients", scaling = c("global", "by.level"),
    rhlab = FALSE, sub, NotPlotVal = 0.005, xlab = "Translate",
    ylab = "wd-equivalent Resolution Level", miss.coef.col = 2,
    miss.coef.cex = 0.5, miss.coef.pch = 2, ...)

Arguments

x

The hwtANYN object containing the Haar wavelet transform coefficients you wish to plot.

xlabvals

Coordinates of x-axis labels you wish to add.

xlabchars

Labels to be printed at the x-axis labels specified.

ylabchars

Y-axis labels

first.level

Specifies the coarsest level to be plotted.

main

Specify a different main title for the plot.

scaling

How coefficients will be scaled on the plot. This can be two arguments "global" where all coefficients are plotted to the same scale and "by.level" where all coefficients on the same resolution level are plotted to the same scale, but coefficients on different resolution levels might be of different scales.

rhlab

If TRUE then the scale factor used for each level is shown.

sub

Specify a different subtitle for the plot.

NotPlotVal

Coefficients will not be plotted if their scaled height is less than NotPlotVal in absolute value. This is a useful way to completely suppress very small coefficient values.

xlab

Specify the x-axis label.

ylab

Specify the y-axis label.

miss.coef.col

What color to plot "missing coefficients" in.

miss.coef.cex

How big to plot the "missing coefficients" symbol.

miss.coef.pch

The type of plotting character used to plot the "missing coefficients".

...

Other arguments to plot.

Details

A plot of the different wavelet coefficients at the scales ranging from first.level to the finest scale. Note, in this plot the coefficients are NOT aligned with time at different scales in the same way as in the wd type plot - except the finest scale.

The Haar wavelet transform objects that this function plots are obtained originally from vectors of non-dyadic length. One can think of such a vector as a sub-vector of a longer vector of dyadic length. E.g. if your vector is of length 35 then it is a sub-vector of a vector of 64 (the next highest power of two). So, you can think of the Haar wavelet transform being of a vector of length 64 where 64-35=29 of the observations are missing. These missing observations "contribute" to wavelet (and scaling function) coefficients that are missing. This function has the ability to plot the "missing" coefficients, by default as small red triangles. The user can control the colour, size and plotting character of the missing observations.

Value

A single vector of length the number of levels plotted containing the value of the maximum absolute coefficient value.

Author(s)

G. P. Nason

References

Nason, G.P. (2013) A test for second-order stationarity and approximate confidence intervals for localized autocovariances for locally stationary time series. J. R. Statist. Soc. B, 75, 879-904. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/rssb.12015")}

Priestley, M.B. and Subba Rao (1969) A test for non-stationarity of time series. J. R. Statist. Soc. B, 31, 140-149.

von Sachs, R. and Neumann, M.H. (2000) A wavelet-based test for stationarity. J. Time Ser. Anal., 21, 597-613.

See Also

hwt, print.hwtANYN

Examples

#
# Generate test data of length 82
#
v3 <- rnorm(82)
#
# Compute Haar wavelet transform, note reindex has to be true for subsequent
# plot.
#
v3.hwt <- hwt(v3, reindex=TRUE)
#
#
## Not run: plot(v3.hwt)

locits documentation built on Sept. 8, 2023, 5:07 p.m.