compute_cov_cor {robustfa} | R Documentation |
Compute the Robust Covariance and Correlation Matrix of A Numeric Matrix
Description
Compute the robust covariance and correlation matrix of a numeric matrix. The function is used to check whether S_r != S_r_tilda and R_r == R_r_tilda?
Usage
compute_cov_cor(x, control)
Arguments
x |
A numeric matrix or an object that can be coerced to a numeric matrix. |
control |
A control object (S4) for one of the available control classes, e.g. |
Value
A list with the following components:
S_r |
The robust covariance matrix of cov_x. |
S_r_tilda |
The robust covariance matrix of cov_scale_x. |
R_r |
The robust correlation matrix of cov_x. |
R_r_tilda |
The robust correlation matrix of cov_scale_x. |
cov_x = rrcov::CovRobust(x = x, control = control) cov_scale_x = rrcov::CovRobust(x = scale(x), control = control)
Author(s)
Ying-Ying Zhang (Robert) robertzhangyying@qq.com
References
Zhang, Y. Y. (2013), An Object Oriented Solution for Robust Factor Analysis.
Examples
data("hbk")
hbk.x = hbk[,1:3]
compute_cov_cor(x = hbk.x, control = "mcd")