lacv {costat}R Documentation

Computes localized (wavelet) autocovariance function


Compute the LACV function for a locally stationary wavelet process.


lacv(x, filter.number = 10,
	family = c("DaubExPhase", "DaubLeAsymm"),,
	AutoReflect=TRUE, lag.max=NULL, smooth.RM=0, ...)



The time series you want to compute the LACV for


The wavelet that you wish to compute the LACV with respect to


The wavelet family

The deviance used in smoothing if running mean smoothing is not used, ie in the call to ewspec.


If TRUE then the spectrum is computed on a boundary-corrected series, overcoming the lack of periodicity in the time series.


The maximum lag that the function computes. If this option is NULL then the largest possible will be computed and used


If this is zero then regular wavelet smoothing of the periodogram will be used. If not zero then running mean smoothing of the periodogram will be used with a bandwidth given by this argument.


Additional arguments to the spectrum computation contained within


A locally stationary wavelet process is a particular kind of non-stationary time series constructed out of wavelet atoms, with a time-varying spectrum (slowly varying). This kind of model is useful for time series whose spectral properties change over time.

The time-varying spectrum can be computed from within the WaveThresh library by the ewspec function. However, just as in the classical stationary case, where the spectrum and autocovariance are a Fourier transform pair, the paper Nason, von Sachs, Kroisandt (2000) [NvSK2000] shows that the evolutionary wavelet spectrum is paired to a localized autocovariance function using a wavelet-like transform. This is expressed in formula (14) of the NvSK2000 paper.

This function computes the localized autocovariance by first computing the estimate of the evolutionary spectrum, and then directly transforming it using formula (14) via the autocorrelation wavelet transform.


An object of class lacv. This is a list with the following components: lacv which is a matrix that contains the localized autocovariance. If the original time series was of length T, then the number of rows of the returned matrix is also T, one row for each time point. The columns of the array correspond to the lag. The number of columns, 2K+1, depends both on the length of the time series and also the order of the wavelet (smoother wavelets return lacv matrices with larger number of lags). Lag 0 is always the centre column, with negative lags from -K to -1 are the leftmost columns, lags from 1 to K are the rightmost columns; lacr: a matrix, with the same dimensions as lacv but containing the local autocorrelations; date: the date this function was executed.


Guy Nason


Cardinali, A. and Nason, Guy P. (2013) Costationarity of Locally Stationary Time Series Using costat. Journal of Statistical Software, 55, Issue 1.

Cardinali, A. and Nason, G.P. (2010) Costationarity of locally stationary time series. J. Time Series Econometrics, 2, Issue 2, Article 1.

Nason, G.P., von Sachs, R. and Kroisandt, G. (2000) Wavelet processes and adaptive estimation of the evolutionary wavelet spectrum. J. R. Statist. Soc. B, 62, 271-292.

See Also

ewspec, print.lacv, plot.lacv, summary.lacv


# Generate an AR(1) time series
vsim <- arima.sim(model=list(ar=0.8), n=1024)
# Compute the ACF of this stationary series
vsim.acf <- acf(vsim, plot=FALSE)
# Compute the localized autocovariance. We'll use
# a reasonably smooth wavelet.
vsim.lacv <- lacv(vsim, filter.number=4, lag.max=30)
# Now plot the time-varying autocorrelations, only the first 5 lags
## Not run: plot(vsim.lacv, lags=0:5)
# Now plot the localized autocorrelation at time t=100, a plot similar
# to the usual R acf plot.
## Not run: plot(vsim.lacv, type="acf", the.time=100)

[Package costat version 2.4 Index]