smooth.over.scale {CNLTtsa} | R Documentation |
Function to perform smoothing over scale of spectral quantities
Description
This function uses simple averaging or smoothing splines to smooth spectra over scale
Usage
smooth.over.scale(x, det1, det2, lre, lreA, scale.range = NULL, Arange = NULL,
Jstar = 20, splines = FALSE, positive = FALSE, dfS = 10, interpolate = FALSE)
Arguments
x |
A vector corrsponding to the sampling grid of the component of a univariate series, or both components of a bivariate series with identical sampling grids. |
det1 |
A list of (real or imaginary parts of) the component 1 detail coefficients from a CNLT decomposition, such as from the output of |
det2 |
A list of (real or imaginary parts of) the component 2 detail coefficients from a CNLT decomposition, such as from the output of |
lre |
A list of scales (removed integral lengths) corresponding to det from a CNLT decomposition, such as from the output of |
lreA |
A list of asymmetry values from a CNLT decomposition, such as from the output of |
scale.range |
An optional two-vector specifying the range of scales to be considered in the resulting output spectrum. |
Arange |
An optional two-vector specifying whether the values used in forming the output spectrum should be limited to those from a specific range of asymmetry values, see Sanderson (2010), chapter 6.2. |
Jstar |
The number of artificial scales in the output spectrum. |
splines |
An indicator variable whether smoothing splines should be used for the scale-based smoothing, or simple averaging ( |
positive |
An indicator variable whether the smoothing should ensure that the resulting output is positive or not (e.g. for spectra). |
dfS |
An argument, if |
interpolate |
An indicator variable for whether interpolation should be used in the smoothing spline method for predicting values outside the range of the data. |
Details
For a univariate series or a bivariate series where the two components have the same sampling grids, the co- /quadrature periodogram values are first formed. They are then smoothed over scale (per timepoint), to give spectral values corresponding to equal artificial levels by setting Jstar and optionally scale.range.
Value
A list with the following components:
spec |
A matrix of dimension |
mscale |
A vector of scales (of length Jstar) corresponding to the rows of the spectrum |
Author(s)
Jean Hamilton, Matt Nunes
References
Hamilton, J., Nunes, M. A., Knight, M. I. and Fryzlewicz, P. (2018) Complex-valued wavelet lifting and applications. Technometrics, 60 (1), 48-60, DOI 10.1080/00401706.2017.1281846.
See Also
Examples
x<-sort(runif(100))
y <-sin(2*pi*(1/25)*x) + sin(2*pi*(1/50)*x)
## Not run:
xy.dec<-cnlt.univ(x,y,P=300)
# compute the real part of the spectrum (real details^2) and smooth over scale
ReS <- smooth.over.scale(x, sapply(xy.dec$det1,Re), sapply(xy.dec$det1,Re), xy.dec$lre,
xy.dec$lreA, positive = TRUE)
## End(Not run)