tapered_est: Compute the Estimated Tapered Autocovariance Function over a...

View source: R/tapered_estimator.R

tapered_estR Documentation

Compute the Estimated Tapered Autocovariance Function over a Set of Lags.

Description

This function computes the tapered autocovariance over a set of lags. For each lag, the tapered autocovariance is computed using the function tapered_single.

Usage

tapered_est(
  X,
  rho,
  window_name,
  window_params = c(1),
  maxLag = length(X) - 1,
  type = "autocovariance",
  meanX = mean(X),
  custom_window = FALSE
)

Arguments

X

A vector representing observed values of the time series.

rho

A scale parameter in (0, 1].

window_name

The name of the window function to be used. Possible values are: tukey, triangular, power_sine, blackman_window, hann_poisson, welch. Alternatively, a custom window function can be provided, see the example in taper_single.

window_params

A vector of parameters of the window function.

maxLag

An optional parameter that determines the maximum lag to compute the estimated autocovariance function at. Defaults to length(X) - 1.

type

Compute either the 'autocovariance' or 'autocorrelation'. Defaults to 'autocovariance'.

meanX

The average value of X. Defaults to mean(X).

custom_window

If a custom window is to be used or not. Defaults to FALSE.

Details

This function computes the estimated tapered autocovariance over a set of lags,

\widehat{C}_{N}^{a} (h) = (H_{2, n}(0))^{-1} \sum_{j=1}^{N-h} (X(j) - \bar{X} ) ( X(j + h) - \bar{X} ) a((j - 1/2) / N; \rho) a((j + h - 1/2) / N; \rho) ,

where a(\cdot) is a window function, \rho \in (0, 1] is a scale parameter. This estimator takes into account the edge effect during estimation, assigning a lower weight to values closer to the boundaries and higher weights for observations closer to the middle. This estimator is positive-definite and asymptotically unbiased.

Internally, this function calls tapered_single for each lag h.

Value

A vector whose values are the estimated tapered autocovariances.

References

Dahlhaus R. & Künsch, H. (1987). Edge Effects and Efficient Parameter Estimation for Stationary Random Fields. Biometrika 74(4), 877-882. 10.1093/biomet/74.4.877

Examples

X <- c(1, 2, 3)
tapered_est(X, 0.5, "tukey", maxLag = 2)

CovEsts documentation built on Sept. 10, 2025, 10:39 a.m.

Related to tapered_est in CovEsts...