Learn R Programming

robustfa (version 1.0-4)

compute_cov_cor: 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. CovControlMcd-class, CovControlOgk-class, CovControlSest-class, etc., containing estimation options. The class of this object defines which estimat

Value

  • A list with the following components:
  • S_rThe robust covariance matrix of cov_x.
  • S_r_tildaThe robust covariance matrix of cov_scale_x.
  • R_rThe robust correlation matrix of cov_x.
  • R_r_tildaThe robust correlation matrix of cov_scale_x.
  • cov_x = CovRobust(x = x, control = control) cov_scale_x = CovRobust(x = scale(x), control = control)

References

Zhang, Y. Y. (2013), An Object Oriented Solution for Robust Factor Analysis.

Examples

Run this code
data("hbk")
hbk.x = hbk[,1:3]

compute_cov_cor(x = hbk.x, control = "mcd")

Run the code above in your browser using DataLab