spd.estimate: Covariance estimation

View source: R/spd-estimate.R

spd.estimateR Documentation

Covariance estimation

Description

Function implements several forms of covariance estimation.

Usage

spd.estimate(x, method = "linshrink", ...)

Arguments

x

A data matrix, where rows are observations and columns are variables

method

Method of covariance estimation. See details

...

Additional arguments passed to estimation functions. See details.

Details

Allowable estimation methods are:

  • "sample": The ordinary sample covariance. Generally a poor choice in anything but very low dimensional settings, and is not guaranteed to be positive-definite.

  • "linshrink": Linear shrinkage estimator proposed by Ledoit and Wolf (2004)

  • "nlshrink": Non-linear shrinkage estimator proposed by Ledoit and Wolf (2012)

  • "glasso": Graphical lasso (glasso) estimation using the huge package. Typically generates sparse estimates.

Additional arguments may be passed to the functions which perform estimation. Specifically:

  • "sample": Uses cov(x, ...)

  • "linshrink": Uses nlshrink::linshrink_cov(x, ...)

  • "nlshrink": Uses nlshrink::nlshrink_cov(x, ...)

  • "glasso": Uses huge(x, method = 'glasso', cov.output = T, ...) followed by huge.select(x, ...). Note that method cannot be overridden, as other estimation methods do not return covariance estimates. Additional arguments to huge() or huge.select() should be prepended with huge. or select., respectively.

In all cases, function will generate a warning if the estimated matrix is not positive definite.

Value

A covariance matrix


areshenk/spdm documentation built on Aug. 5, 2023, 12:26 a.m.