standard_est | R Documentation |
This function computes the following two estimates of the autocovariance function depending on
the parameter pd
.
standard_est(
X,
pd = TRUE,
maxLag = length(X) - 1,
type = "autocovariance",
meanX = mean(X)
)
X |
A vector representing observed values of the time series. |
pd |
Whether a positive-definite estimate should be used. Defaults to |
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 |
For pd = TRUE
:
\widehat{C}(h) = \frac{1}{N} \sum_{j=1}^{N-h} ( X(j) - \bar{X} ) ( X(j + h) - \bar{X} ) .
For pd = FALSE
:
\widehat{C}(h) = \frac{1}{N - h} \sum_{j=1}^{N-h} ( X(j) - \bar{X} ) ( X(j + h) - \bar{X} ) .
This function will generate autocovariance values for lags h
from the set \{0, \dots, \mbox{maxLag}\}.
The positive-definite estimator must be used cautiously when estimating over all lags as the sum of all values of the autocorrelation function equals to -1/2
.
For the nonpositive-definite estimator a similar constant summation property holds.
A vector whose values are the autocovariance estimates.
Bilchouris, A. & Olenko, A (2025). On Nonparametric Estimation of Covariogram. Austrian Statistical Society 54(1), 112-137. https://doi.org/10.17713/ajs.v54i1.1975
X <- c(1, 2, 3)
standard_est(X, pd = FALSE, maxLag = 2, meanX = mean(X))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.