| ewspec3 | R Documentation | 
This function is a development of the ewspec
function from wavethresh but with more features.
The two new features are: the addition of running mean smoothing
and autoreflection which mitigates the problems caused in
ewspec which performed periodic transforms on
data (time series) which were generally not periodic. 
ewspec3(x, filter.number = 10, family = "DaubLeAsymm",
    UseLocalSpec = TRUE, DoSWT = TRUE, WPsmooth = TRUE,
    WPsmooth.type = "RM", binwidth = 5, verbose = FALSE,
    smooth.filter.number = 10, smooth.family = "DaubLeAsymm",
    smooth.levels = 3:WPwst$nlevels - 1, smooth.dev = madmad,
    smooth.policy = "LSuniversal", smooth.value = 0,
    smooth.by.level = FALSE, smooth.type = "soft",
    smooth.verbose = FALSE, smooth.cvtol = 0.01,
    smooth.cvnorm = l2norm, smooth.transform = I,
    smooth.inverse = I, AutoReflect = TRUE)
| x | The time series you want to compute the evolutionary wavelet spectrum for. | 
| filter.number | Wavelet filter number underlying the analysis
of the spectrum (see  | 
| family | Wavelet family. Again, see  | 
| UseLocalSpec |  As  | 
| DoSWT | As  | 
| WPsmooth | If  | 
| WPsmooth.type | The type of periodogram smoothing. 
If this argument is  | 
| binwidth | If the periodogram smoothing is  | 
| verbose | If  | 
| smooth.filter.number | If wavelet smoothing of the wavelet
periodogram is used then this specifies the index number of
wavelet to use, exactly as  | 
| smooth.family | If wavelet smoothing of the wavelet
periodogram is used then this specifies the family of
wavelet to use, exactly as  | 
| smooth.levels | If wavelet smoothing of the wavelet
periodogram is used then this specifies the levels to
smooth, exactly as  | 
| smooth.dev | If wavelet smoothing of the wavelet
periodogram is used then this specifies  deviance used
to compute smoothing thresholds, exactly as  | 
| smooth.policy | If wavelet smoothing of the wavelet
periodogram is used then this specifies the policy
of wavelet shrinkage to use, exactly as  | 
| smooth.value | If wavelet smoothing of the wavelet
periodogram is used then this specifies the value of the
smoothing parameter for some policies, exactly as  | 
| smooth.by.level | If wavelet smoothing of the wavelet
periodogram is used then this specifies whether level-by-level
thresholding is applied, or one threshold is applied to
all levels, exactly as  | 
| smooth.type | If wavelet smoothing of the wavelet
periodogram is used then this specifies the type of
thresholding, "hard" or "soft", exactly as  | 
| smooth.verbose | If wavelet smoothing of the wavelet
periodogram is used then this specifies whether or not
verbose messages are produced during the smoothing,
exactly as  | 
| smooth.cvtol | If wavelet smoothing of the wavelet
periodogram is used then this specifies a tolerance
for the cross-validation algorithm if it is specified
in the  | 
| smooth.cvnorm | Ditto to the previous argument, but this one supplies the norm used by the cross-validation. | 
| smooth.transform | If wavelet smoothing of the wavelet
periodogram is used then this specifies whether a transform
is used to transform the periodogram before smoothing, 
exactly as  | 
| smooth.inverse | Should be the mathematical inverse of
the  | 
| AutoReflect | Whether the series is internally reflected before
application of the wavelet transforms. So,  | 
Precisely the same kind of output as ewspec.
Guy Nason.
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")}
AutoBestBW, lacf
#
# Generate time series
#
x <- tvar1sim()
#
# Compute its evolutionary wavelet spectrum, with linear running mean smooth
#
x.ewspec3 <- ewspec3(x)
#
# Plot the answer, probably its a bit variable, because the default bandwidth
# is 5, which is probably inappropriate for many series
#
## Not run: plot(x.ewspec3$S)
#
# Try a larger bandwidth
#
x.ewspec3 <- ewspec3(x, binwidth=100)
#
# Plot the answer, should look a lot smoother
#
# Note, a lot of high frequency power on the right hand side of the plot,
# which is expected as process looks like AR(1) with param of -0.9
#
## Not run: plot(x.ewspec3$S)
#
# Do smoothing like ewspec (but additionally AutoReflect)
#
x.ewspec3 <- ewspec3(x, WPsmooth.type="wavelet")
#
# Plot the results
#
## Not run: plot(x.ewspec3$S)
#
# Another possibility is to use AutoBestBW which tries to find the best
# linear smooth closest to a wavelet smooth. This makes use of ewspec3
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.