varimax2 | R Documentation |
Varimax rotation
varimax2(X, normalize = FALSE, reorder = TRUE, rotmat = FALSE)
X |
A matrix with more rows than columns. |
normalize |
Whether to apply Kaiser normalization? See stats::varimax.
Default is |
reorder |
Whether to permute rotation vectors to maximize the conservation
of the order of the initial columns of |
rotmat |
Whether to return the rotation matrix |
Either the rotation matrix rot
, or the rotated matrix X %*% rot
,
depending on rotmat
.
X <- as.matrix(iris[1:4])
X_rot <- varimax2(X)
X_rot2 <- varimax(X, normalize = FALSE)$loadings[]
all.equal(X_rot2, X_rot[, c(3, 2, 1, 4)], check.attributes = FALSE)
varimax2(X, rotmat = TRUE)
X2 <- prcomp(X)$x
X2_rot <- varimax2(X2)
X2_rot2 <- varimax(X2, normalize = FALSE)$loadings[]
all.equal(X2_rot, X2_rot2, check.attributes = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.