View source: R/corrected_standard_estimator.R
| shrinking | R Documentation |
This function corrects an autocovariance/autocorrelation function estimate via linear shrinking of the autocorrelation matrix.
shrinking(estCov, return_matrix = FALSE, target = NULL)
## S3 method for class 'CovEsts'
shrinking(estCov, return_matrix = FALSE, target = NULL)
## Default S3 method:
shrinking(estCov, return_matrix = FALSE, target = NULL)
estCov |
A vector whose values are an estimate autocovariance/autocorrelation function. |
return_matrix |
A boolean determining whether the shrunken matrix or the corresponding vector is returned. If |
target |
A shrinkage target matrix used in the shrinking process. This should only be used if you wish to use a specific matrix as the target. |
This function corrects an autocovariance/autocorrelation function estimate via linear shrinking of the autocorrelation matrix. The shrunken autocorrelation matrix is computed as follows
\widetilde{R} = \lambda R + (1 - \lambda)I_{p},
where \widetilde{R} is the shrunken autocorrelation matrix, R is the original autocorrelation matrix, \lambda \in [0, 1], and I_{p} is the p\times p identity matrix.
\lambda is chosen in such a away that largest value which still results in a positive-definite matrix.
The shrunken matrix will be positive-definite.
A vector with values of the shrunken autocorrelation function, the corresponding matrix (depending on return_matrix), or CovEsts S3 object (list) with the following values
acfA numeric vector containing the shrunken autocovariance/autocorrelation estimates.
lagsA numeric vector containing the lag indices used to compute the estimates on, inherited from the argument estCov.
est_typeThe type of estimate, namely 'autocorrelation' or 'autocovariance', this depends on the argument type.
est_usedThe estimator function used, in this case, inherited from the argument estCov.
correction_methodThis value is 'shrinking'.
lambdaThe \lambda value obtained during the shrinking process.
If a numeric vector is given for the argument estCov, then a numeric vector output is given, and if a CovEsts S3 object is given, a CovEsts object is given as output.
shrinking(CovEsts): Method for CovEsts objects.
shrinking(default): Method for numeric vectors
Devlin, S. J., Gnanadesikan R. & Kettenring, J. R. (1975). Robust Estimation and Outlier Detection with Correlation Coefficients. Biometrika, 62(3), 531-545. 10.1093/biomet/62.3.531
Rousseeuw, P. J. & Molenberghs, G. (1993). Transformation of Non Positive Semidefinite Correlation Matrices. Communications in Statistics - Theory and Methods, 22(4), 965-984. 10.1080/03610928308831068
estCorr <- c(1, 0.8, 0.5, -1.2)
shrinking(estCorr)
target <- diag(length(estCorr))
shrinking(estCorr, TRUE, target)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.