Internal: Calculate indicator correlation matrix
Calculate the indicator correlation matrix using conventional or robust methods.
calculateIndicatorCor( .X_cleaned = NULL, .approach_cor_robust = "none" )
A data.frame of processed data (cleaned and ordered). Note:
X_cleanedmay not be scaled!
Character string. Approach used to obtain a robust indicator correlation matrix. One of: "none" in which case the standard Bravais-Person correlation is used, "spearman" for the Spearman rank correlation, or "mcd" via
MASS::cov.rob()for a robust correlation matrix. Defaults to "none". Note that many postestimation procedures (such as
fit()implicitly assume a continuous indicator correlation matrix (e.g. Bravais-Pearson correlation matrix). Only use if you know what you are doing.
.approach_cor_robust = "none" (the default) the type of correlation computed
depends on the types of the columns of
.X_cleaned (i.e., the indicators)
involved in the computation.
If both columns (indicators) involved are numeric, the Bravais-Pearson product-moment correlation is computed (via
If any of the columns is a factor variable, the polyserial correlation Drasgow1988cSEM is computed (via
If both columns are factor variables, the polychoric correlation Drasgow1988cSEM is computed (via
Note: logical input is treated as a 0-1 factor variable.
"mcd" (= minimum covariance determinant), the MCD estimator
Rousseeuw1999cSEM, a robust covariance estimator, is applied
"spearman", the Spearman rank correlation is used (via
A list with elements:
The (K x K) indicator correlation matrix
The type(s) of indicator correlation computed ( "Pearson", "Polyserial", "Polychoric")
Currently ignored (NULL)