2
The command factanal()
factor analysis shows a meaningless error message.
I have to perform the factor analysis, I want to compare the scores obtained when using the solutions by the variance matrix and the correlation matrix.
X matrix lack error appears, but it is inside the command.
Follows basis of the R:
iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),Sp = rep(c("s","c","v"), rep(50,3)))
iris = cbind(iris[,(1:4)])
Follow executed command and Techo error:
mvscov <- factanal(iris, factors=1, covmat=var(iris), n.obs=150, rotation="none", scores="regression")
Error in factanal(iris, factors = 1, covmat = var(iris), n.obs = 150, :
scores requeridos sem uma matriz 'x'
mvscor <- factanal(iris, factors=1, covmat=cor(iris), n.obs=150, rotation="none", scores="regression")
Error in factanal(iris, factors = 1, covmat = cor(iris), n.obs = 150, :
scores requeridos sem uma matriz 'x'
I have no experience in using this function, but analyzing help and the source code you can see that you can only use
scores = "regression"
(or"Bartlett"
) if you do not pass a par value tocovmat
. The following alternatives work:factanal(iris2, factors=1, n.obs=150, rotation="none", scores="regression")
andfactanal(iris2, factors=1, covmat=var(iris), n.obs=150, rotation="none", scores="none")
. Are you sure that neither of the two is correct for your case? For this example, both return the same result.– Molx