centre: Centres (converts to zero-mean) the time series.

Description Usage Arguments References Examples

View source: R/multitaper.R

Description

Centres the data using an expansion on the Slepian sequences if the bandwidth parameter (nw) and number of tapers (k) is specified, otherwise subtracts the mean or robust trimmed mean.

Usage

1
centre(x, nw = NULL, k = NULL, deltaT = NULL, trim = 0)

Arguments

x

The data as a vector or as a time series.

nw

The Slepian bandwidth parameter, typically between 2.0 and 6.0.

k

The number of Slepian tapers used, often 2*nw.

deltaT

Parameter required if the data is a vector and not a time series, and only for the Slepian case.

trim

[only used if nw and k are not specified] The fraction (0 to 0.5) of observations to be trimmed from each end of ‘x’ before the mean is computed. Values of trim outside that range are taken as the nearest endpoint.

References

Thomson, D.J (1982) Spectrum estimation and harmonic analysis. Proceedings of the IEEE Volume 70, number 9, pp. 1055–1096.

Slepian, D. (1978) Prolate spheroidal wave functions, Fourier analysis, and uncertainty. V–The discrete case. Bell System Technical Journal Volume 57, pp. 1371–1430.

Examples

1
2
3
data(willamette)
cent.Slepian <- centre(willamette, nw=4, k=8, deltaT=1)
cent.Trim <- centre(willamette, trim=0.2)

multitaper documentation built on Nov. 17, 2017, 4:02 a.m.