meanCoeff, acfCoeff {boodd} | R Documentation |
Fourier Coefficients Estimation of the Mean and Autocovariance Functions.
Description
For both periodically (PC) and almost periodically correlated (APC) data, the functions calculate the Fourier coefficients of the mean and autocovariance functions. The function can also be used for bootstrap samples obtained with the EMBB, CEMBB, GSBB, CGSBB.
Usage
meanCoeff(x, period, freq, ...)
acfCoeff(x, tau, period, freq, ...)
## Default S3 method:
meanCoeff(x, period, freq, ...)
## Default S3 method:
acfCoeff(x, tau, period, freq, ...)
## S3 method for class 'ts'
meanCoeff(x, period=frequency(x), freq, ...)
## S3 method for class 'ts'
acfCoeff(x, tau, period=frequency(x), freq, ...)
Arguments
x |
A vector or time series representing a periodically or almost periodically correlated time series. |
period |
A positive integer; the period length. By default it is |
tau |
A vector of integers; a single lag or vector of lags. |
freq |
A numeric vector of frequencies. |
... |
Optional additional arguments for the function. |
Details
If the freq
argument is not specified, the Fourier frequencies are used:
2*k*pi/period
for k=0,1,...,period, where period
is the frequency of the time series.
The meanCoeff
function implements the estimator of the Fourier coefficient of the mean
at frequency \gamma
:
\widehat{b}(\gamma) = \frac{1}{n}\sum_{t=1}^n X_t e^{-i\gamma t}.
The acfCoeff
function implements the estimator of the Fourier
coefficient of the autocovariance for given lag tau
at frequency
\lambda
:
\widehat{a}(\lambda,\tau) = \frac{1}{n}\sum_{t=1-\min\{\tau,0\}}^{n-\max\{\tau,0\}} (X_{t+\tau}-\widehat{\mu}_n(t+\tau))
(X_{t}-\widehat{\mu}_n(t))e^{-i\lambda t}.
Value
meanCoeff
returns a vector of the same length as freq
.
acfCoeff
returns either a vector of length length(freq)
if a single
lag tau
is specified, or a matrix with length(tau)
rows and length(freq)
columns if tau
is a vector.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted..
Dudek, A.E. (2015). Circular block bootstrap for coefficients of autocovariance function of almost periodically correlated time series. Metrika, 78, 313-335.
Dudek, A.E. Maiz, S. and Elbadaoui, M. (2014). Generalized Seasonal Block Bootstrap in frequency analysis of cyclostationary signals. Signal Process., 104C, 358-368.
See Also
seasonalMean
,
seasonalVar
,
seasonalACF
Examples
# Fourier frequencies for the data nottem (temperatures at Nottingham Castle)
meanCoeff(nottem)
acfCoeff(nottem, 5)
# Given frequencies
freq <- 2 * (0:5) * pi / 12
meanCoeff(nottem, freq = freq)