Learn R Programming

locits (version 1.7.7)

whichlevel: Helper routine for mkcoef

Description

Helps mkcoef by finding out how many more levels are required to compute a set of discrete wavelets to a given (other) level.

Usage

whichlevel(J, filter.number = 10, family = "DaubLeAsymm")

Value

Simply returns the required number of levels

Arguments

J

The level that mkcoef wants to compute to.

filter.number

The wavelet number (see wd)

family

The wavelet family (see wd)

Author

Guy Nason.

Details

When computing the discrete wavelets up to a given scale we use the inverse wavelet transform to do this. However, to generate a wavelet within the range of a wavelet decomposition you have to use more scales in the inverse wavelet transform than first requested. This is because wavelet coefficients at the coarsest scales are associated with wavelets whose support is greater than the whole extent of the series. Hence, you have to have a larger wavelet transform, with more levels, insert a coefficient mid-level to generate a discrete wavelet whose support lies entirely within the extent of the series. This function figures out what the extra number of levels should be.

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. tools:::Rd_expr_doi("10.1111/rssb.12015")

See Also

mkcoef

Examples

Run this code
whichlevel(6)
# [1] 11
#
# E.g. mkcoef wanted to generate 6 levels of discrete wavelets and
# whichlevel tells it that it needs to generate a wavelet transform
# of at least 11 levels.

Run the code above in your browser using DataLab