Hello Guys,

I have problem with the factanal function, I dont understand why it tells me
everytime "2 factors is too many for 3 variables"

data set:
http://www.statistik.tuwien.ac.at/public/filz/students/multi/ss07/world2.R

code:
library(robustbase)

source("world2.R")

str(world) # structure
summary(world)

world[,8] <- log(world[,8])
world[,9] <- log(world[,9])
x <- world[,-c(1,2)]
x = scale(x)
princomp(x, cor=TRUE)
summary(princomp(x, cor=TRUE))  # First Three Main Components: 0.8687063

#a) paarweise Biplots
biplot(princomp(x, cor=TRUE))
biplot(princomp(x, cor=TRUE), choices=c(1:2))
biplot(princomp(x, cor=TRUE), choices=c(1:3))
biplot(princomp(x, cor=TRUE), choices=c(2:3))

#b) varimax
x.loa <- loadings(princomp(x, cor=TRUE))
varimax(x.loa[,1:3])
varimax(x.loa[,1:3])$rotmat
rotmat <- varimax(x.loa[,1:3])$rotmat
biplot(princomp(rotmat, cor=TRUE), choices=c(1:2))
biplot(princomp(rotmat, cor=TRUE), choices=c(1:3))
biplot(princomp(rotmat, cor=TRUE), choices=c(2:3))

#c) factor-analysis
factanal(rotmat, factors=2)   ## ?????

Thanks in advance.

KR,
Alin Soare

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to