calculateIndicatorCor | R Documentation |
Calculate the indicator correlation matrix using conventional or robust methods.
calculateIndicatorCor( .X_cleaned = NULL, .approach_cor_robust = "none" )
.X_cleaned |
A data.frame of processed data (cleaned and ordered). Note: |
.approach_cor_robust |
Character string. Approach used to obtain a robust
indicator correlation matrix. One of: "none" in which case the standard
Bravais-Pearson correlation is used,
"spearman" for the Spearman rank correlation, or
"mcd" via |
If .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.
Numeric-numeric
If both columns (indicators) involved are numeric, the
Bravais-Pearson product-moment correlation is computed (via stats::cor()
).
Numeric-factor
If any of the columns is a factor variable, the
polyserial correlation \insertCiteDrasgow1988cSEM is computed (via
polycor::polyserial()
).
Factor-factor
If both columns are factor variables, the
polychoric correlation \insertCiteDrasgow1988cSEM is computed (via
polycor::polychor()
).
Note: logical input is treated as a 0-1 factor variable.
If "mcd"
(= minimum covariance determinant), the MCD estimator
\insertCiteRousseeuw1999cSEM, a robust covariance estimator, is applied
(via MASS::cov.rob()
).
If "spearman"
, the Spearman rank correlation is used (via stats::cor()
).
A list with elements:
$S
The (K x K) indicator correlation matrix
$cor_type
The type(s) of indicator correlation computed ( "Pearson", "Polyserial", "Polychoric")
$thre_est
Currently ignored (NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.