AutoBestBW {locits} | R Documentation |
Choose a good bandwidth for running mean smoothing of a EWS spectral estimator.
Description
Computes running mean estimator closest to wavelet estimator of evolutionary wavelet spectrum. The idea is to obtain a good linear bandwidth.
Usage
AutoBestBW(x, filter.number = 1, family = "DaubExPhase",
smooth.dev = var, AutoReflect = TRUE, tol = 0.01, maxits = 200,
plot.it = FALSE, verbose = 0, ReturnAll = FALSE)
Arguments
x |
Time series you want to analyze. |
filter.number |
The wavelet filter used to carry out smoothing operations. |
family |
The wavelet family used to carry out smoothing operations. |
smooth.dev |
The deviance estimate used for the smoothing (see ewspec help) |
AutoReflect |
Mitigate periodic boundary conditions of wavelet transforms by reflecting time series about RHS end before taking transforms (and is undone before returning the answer). |
tol |
Tolerance for golden section search for the best bandwidth |
maxits |
Maximum number of iterations for the golden section search |
plot.it |
Plot the values of the bandwidth and its closeness of the linear smooth to the wavelet smooth, if TRUE. |
verbose |
If nonzero prints out informative messages about the progress of the golden section search. Higher integers produce more messages. |
ReturnAll |
If TRUE then return the best bandwidth (in the ans component), the wavelet smooth (in EWS.wavelet) and the closest linear smooth (EWS.linear). If FALSE then just the bandwidth is returned. |
Details
Tries to find the best running mean fit to an estimated spectrum obtained via wavelet shrinkage. The goal is to try and find a reasonable linear bandwidth.
Value
If ReturnAll argument is FALSE then the best bandwidth is returned.
Author(s)
Guy 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. doi:10.1111/rssb.12015
See Also
Examples
#
# Generate synthetic data
#
x <- rnorm(256)
#
# Compute best linear bandwidth
#
tmp <- AutoBestBW(x=x)
#
# Printing it out in my example gives:
# tmp
# [1] 168