Learn R Programming

FarmTest (version 1.0.3)

farm.cov: Covariance estimation with Huber's loss function

Description

This function estimates covariance of multivariate data using the Huber's loss. The tuning parameter is chosen by cross validation.

Usage

farm.cov(X, cv = TRUE, tau = 2, verbose = FALSE)

Arguments

X

an n x p data matrix with each row being a sample.

cv

a boolean, specifying whether or not to run cross-validation for the tuning parameter. Default is TRUE.

tau

>0, multiplier for the tuning parameter for Huber loss function. Default is 2. Only used if cv is FALSE. See details.

verbose

a boolean specifying whether to print runtime updates to the console. Default is TRUE.

Value

A list with the following items

covhat

the covariance matrix

Details

The tuning parameter = tau * sigma * optimal rate where optimal rate is the optimal rate for the tuning parameter. For details, see Fan et al.(2017). sigma is the standard deviation of the data.

References

Huber, P.J. (1964). "Robust Estimation of a Location Parameter." The Annals of Mathematical Statistics, 35, 73<U+2013>101.

Fan, J., Ke, Y., Sun, Q. and Zhou, W-X. (2017). "FARM-Test: Factor-Adjusted Robust Multiple Testing with False Discovery Control", https://arxiv.org/abs/1711.05386.

Zhou, W-X., Bose, K., Fan, J. and Liu, H. (2017). "A New Perspective on Robust M-Estimation: Finite Sample Theory and Applications to Dependence-Adjusted Multiple Testing," Annals of Statistics, to appear, https://arxiv.org/abs/1711.05381.

Examples

Run this code
# NOT RUN {
set.seed(100)
p = 20
n = 10
X = matrix(rnorm( p*n, 0,1), nrow = n)
covhat = farm.cov(X)

# }

Run the code above in your browser using DataLab