compLoad | R Documentation |
The function compares two sets of factor loadings by considering different possible orders of factors and different possible signs of factor loadings.
compLoad(L1, L2)
L1 |
First set of factor loadings in a matrix form (variables are organized in rows and factors are organized in columns). |
L2 |
Second set of factor loadings in a matrix form (variables are organized in rows and factors are organized in columns). |
A list with the following elements:
err
- Sum of squared differences between the values of L1
and L2
(for the corresponding permuation and signs).
perm
- Permutation of columns of L1
that results in the lowest err
value.
sign
- Signs of factor loadings of L1
. The first value corresponds to the first column of L1
and the second value corresponds to the second column of L1
.
Aleš Žiberna and Friedrich Leisch (permutations)
L1 <- cbind(c(0.72, 0.81, 0.92, 0.31, 0.22, 0.15), c(0.11, 0.09, 0.17, 0.77, 0.66, 0.89)) L2 <- cbind(c(-0.13, -0.08, -0.20, -0.78, -0.69, -0.88), c(0.72, 0.82, 0.90, 0.29, 0.20, 0.17)) compLoad(L1, L2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.