View source: R/tapered_estimator.R
tapered_est | R Documentation |
This function computes the tapered autocovariance over a set of lags. For each lag, the tapered autocovariance is computed using the function tapered_single.
tapered_est(
X,
rho,
window_name,
window_params = c(1),
maxLag = length(X) - 1,
type = "autocovariance",
meanX = mean(X),
custom_window = FALSE
)
X |
A vector representing observed values of the time series. |
rho |
A scale parameter in |
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 |
type |
Compute either the 'autocovariance' or 'autocorrelation'. Defaults to 'autocovariance'. |
meanX |
The average value of |
custom_window |
If a custom window is to be used or not. Defaults to |
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
.
A vector whose values are the estimated tapered autocovariances.
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
X <- c(1, 2, 3)
tapered_est(X, 0.5, "tukey", maxLag = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.