# Re: [R] factanal

From: <Bill.Venables_at_csiro.au>
Date: Mon, 14 May 2007 09:49:39 +1000

... and the gals, I presume.

It's because the 'x' argument to factanal is supposed to be the matrix of responses, and not something derived from it as you use below.

> 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
> 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) ## ?????

factanal(x, factors = 2)

### ?

>
>
> KR,
> Alin Soare
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help