View source: R/kernel_regression_estimator.R
| make_pd | R Documentation |
This function can make a function positive-definite using the methods proposed by P. Hall and his coauthors.
make_pd(x, method.1 = TRUE)
## S3 method for class 'CovEsts'
make_pd(x, method.1 = TRUE)
## Default S3 method:
make_pd(x, method.1 = TRUE)
x |
A vector of numeric values of an estimated autocovariance function. |
method.1 |
Should method 1 be used (TRUE) or method 2 (FALSE). |
This function perform positive-definite adjustments proposed by P. Hall and his coauthors.
Method 1 is as follows:
Take the discrete Fourier cosine transform,
\widehat{\mathcal{F}}(\theta).
Compute a modified spectrum \widetilde{\mathcal{F}}(\theta) = \max(\widehat{\mathcal{F}}(\theta), 0) for all sample frequencies.
Perform the Fourier inversion to obtain a new estimator.
Method 2 is as follows:
Take the discrete Fourier cosine transform \widehat{\mathcal{F}}(\theta).
Find the smallest frequency where its associated value in the spectral domain is negative
\hat{\theta} = \inf\{ \theta > 0 : \widehat{\mathcal{F}}(\theta) < 0\}.
Compute a modified spectrum \widetilde{\mathcal{F}} = \widehat{\mathcal{F}}(\theta)\textbf{1}(\theta < \hat{\theta}),
where \textbf{1}(A) is the indicator function over the set A.
Perform the Fourier inversion.
A vector that is the adjusted function or 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, inherited from the argument x.
est_typeThe type of estimate, namely 'autocorrelation' or 'autocovariance', inherited from the argument x.
est_usedThe estimator function used, inherited from the argument x.
correction_methodEither 'method.1' or 'method.2' depending on the argument method.1
If a numeric vector is given for the argument x, then a numeric vector output is given, and if a CovEsts S3 object is given, a CovEsts object is given as output.
make_pd(CovEsts): Method for CovEsts objects.
make_pd(default): Method for numeric vectors.
Hall, P. & Patil, P. (1994). Properties of nonparametric estimators of autocovariance for stationary random fields. Probability Theory and Related Fields 99(3), 399-424. https://doi.org/10.1007/bf01199899
Hall, P., Fisher, N. I., & Hoffmann, B. (1994). On the nonparametric estimation of covariance functions. The Annals of Statistics 22(4), 2115-2134. https://doi.org/10.1214/aos/1176325774
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, 4)
make_pd(X)
check_pd(make_pd(X))
check_pd(make_pd(X, method.1 = FALSE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.