shrinking: Linear Shrinking

View source: R/corrected_standard_estimator.R

shrinkingR Documentation

Linear Shrinking

Description

This function corrects an autocovariance/autocorrelation function estimate via linear shrinking of the autocorrelation matrix.

Usage

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)

Arguments

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 FALSE, it returns a vector whose values are the shrunken autocorrelation function. Defaults to FALSE.

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.

Details

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.

Value

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

acf

A numeric vector containing the shrunken autocovariance/autocorrelation estimates.

lags

A numeric vector containing the lag indices used to compute the estimates on, inherited from the argument estCov.

est_type

The type of estimate, namely 'autocorrelation' or 'autocovariance', this depends on the argument type.

est_used

The estimator function used, in this case, inherited from the argument estCov.

correction_method

This value is 'shrinking'.

lambda

The \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.

Methods (by class)

  • shrinking(CovEsts): Method for CovEsts objects.

  • shrinking(default): Method for numeric vectors

References

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

Examples

estCorr <- c(1, 0.8, 0.5, -1.2)
shrinking(estCorr)
target <- diag(length(estCorr))
shrinking(estCorr, TRUE, target)

CovEsts documentation built on April 19, 2026, 5:06 p.m.

Related to shrinking in CovEsts...