lacf: Compute localized autocovariance.

Description Usage Arguments Details Value Author(s) References See Also Examples

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

1
2
3
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 filter.select for more details.

family

Wavelet family to use, see filter.select for more details.

smooth.dev

Change variance estimate for smoothing. Note: var is good for this purpose.

AutoReflect

If TRUE then an internal reflection method is used to repackage the time series so that it can be analyzed by the periodic-assuming wavelet transforms.

lag.max

The maximum lag of acf required. If NULL then the same default as in the regular acf function is used.

WPsmooth.type

The type of smoothing used to produce the estimate. See ewspec3 for more advice on this.

binwidth

If necessary, the binwidth for the spectral smoothing, see ewspec3 for more info. If WTsmooth.type=="RM" then this argument specifies the binwidth of the kernel smoother applied to the wavelet periodogram. If the argument is missing or zero then an automatic bandwidth is calculated by AutoBestBW.

tol

Tolerance argument for AutoBestBW

maxits

Maximum iterations argument for AutoBestBW

ABBverbose

Verbosity of execution of AutoBestBW

verbose

If TRUE then informative message is printed

...

Other arguments for ewspec3.

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.

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

Rvarlacf

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#
# 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)


Search within the locits package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.