View source: R/tapered_estimator.R
| tapered_est | R Documentation |
This function computes the tapered autocovariance over a set of lags.
tapered_est(
X,
rho,
window_name = c("tukey", "triangular", "sine", "power_sine", "blackman",
"hann_poisson", "welch"),
window_params = c(1),
maxLag = length(X) - 1,
x = 0:length(X),
type = c("autocovariance", "autocorrelation"),
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_ec function to be used. Possible values are: tukey, triangular, sine, power_sine, blackman_window, hann_poisson, welch. Alternatively, a custom window_ec function can be provided, see the example in taper. |
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 |
x |
A vector of lag indices. Defaults to the sequence |
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.
A CovEsts S3 object (list) with the following values
acfA numeric vector containing the autocovariance/autocorrelation estimates.
lagsA numeric vector containing the lag indices used to compute the estimates on.
est_typeThe type of estimate, namely 'autocorrelation' or 'autocovariance', this depends on the type parameter.
est_usedThe estimator function used, in this case, 'tapered_est'.
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.