lacf {locits} | R Documentation |
Compute localized autocovariance.
Description
Compute localized autocovariance function for nonstationary
time series. Note: this function is borrowed from the costat
package, and modified to have linear smoothing, and when that package is complete, it will be removed
from this package.
Usage
lacf(x, filter.number = 10, family = "DaubLeAsymm", smooth.dev = var,
AutoReflect = TRUE, lag.max = NULL, WPsmooth.type = "RM",
binwidth, tol=0.1, maxits=5, ABBverbose=0, verbose=FALSE, ...)
Arguments
x |
The time series you wish to analyze |
filter.number |
Wavelet filter number you wish to use to
analyse the time series (to form the wavelet periodogram, etc)
See |
family |
Wavelet family to use, see |
smooth.dev |
Change variance estimate for smoothing. Note: |
AutoReflect |
If |
lag.max |
The maximum lag of acf required. If NULL then the
same default as in the regular |
WPsmooth.type |
The type of smoothing used to produce the
estimate. See |
binwidth |
If necessary, the |
tol |
Tolerance argument for |
maxits |
Maximum iterations argument for |
ABBverbose |
Verbosity of execution of |
verbose |
If |
... |
Other arguments for |
Details
In essence, this routine is fairly simple. First, the EWS of the time series is computed. Then formula (14) from Nason, von Sachs and Kroisandr (2000) is applied to obtain the time-localized autocovariance from the spectral estimate.
Value
An object of class lacf
which contains the
autocovariance. This object can be handled by functions
from the costat
package. The idea in this package
is that the function gets used internally and much of the
same functionality can be achieved by running
Rvarlacf
and plot.lacfCI
. However,
running lacf
on its own is much faster than
Rvarlacf
as the CI computation is intenstive.
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
Nason, G.P., von Sachs, R. and Kroisandt, G. (2000) Wavelet processes and adaptive estimation of the evolutionary wavelet spectrum. J. R. Statist. Soc. Ser B, 62, 271-292.
See Also
Examples
#
# With wavethresh attached, note binwidth is fabricated here,
# just to make the example work. The lacf implementation in
# the costat package performs wavelet (ie maybe better) smoothing automatically
#
v <- lacf(rnorm(256), binwidth=40)
#
# With costat attached also
#
## Not run: plot(v)