Additive wavelet analysis with CWT diagnostics
Source:R/wavelet_modwt.R
analyze_wavelet_additive.RdCombines CWT analysis (visualization and significance testing) with MODWT MRA (additive components). CWT is used for diagnostics only; MODWT MRA provides the additive component extraction used downstream.
This function expects analyze_wavelet_spectrum() to be available elsewhere in the
package.
Arguments
- series
Numeric vector. Input series (regularly spaced, no missing values).
- signif
Numeric scalar in (0, 1). Significance level for CWT.
- noise
Character. Background noise model for CWT significance testing. Typically
"white"or"red".- min_period
Numeric scalar. Minimum Fourier period for CWT.
- detrend
Logical. If TRUE, removes a linear trend before CWT.
- filter
Character. MODWT filter name. One of
"la8"(default),"haar","d4","d6","d8","la16".- n_levels
Integer scalar or NULL. MODWT levels. If NULL, chosen from CWT significance (when available) and constrained by stability and max-period caps.
- boundary
Character. Boundary handling method. Only
"periodic"is supported.- include_smooth
Logical. If TRUE, includes the smooth component SJ.
- max_period_frac
Numeric scalar in (0, 1]. No structure beyond this fraction of n. Default is
1/3.- cwt_mode
Character. CWT routine mode. One of
"fast"or"complete".- diagnostics
Logical. If TRUE, attaches additional diagnostics (caps and covariance).
Value
A list with class "wavelet_additive". The object contains:
- cwt: output from analyze_wavelet_spectrum()
- components: additive MODWT MRA components (matrix)
- component_names: component column names
- periods: representative MODWT periods per component
- variance, variance_fraction: component variance and fraction of total
- n_levels, filter, filter_length, boundary, include_smooth,
max_period_frac
- has_significance, cwt_signif_periods: CWT significance flags and periods
- cwt_to_modwt_map: MODWT levels implied by significant CWT periods (under caps)
- variance-accounting fields copied from modwt_mra()
- optional diagnostics list when requested