Re: [R] Problem with factor analysis

2011-01-27 Thread Juliet Hannah
It looks like the text didn't show assigning the results of factanal to an object. Try: pgdata<-read.table("pgfull.txt",header=T) names(pgdata) pgd<-pgdata[,1:54] #missing line model <- factanal(pgd,8) par(mfrow=c(2,2)) plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1",ylab="Fac

Re: [R] Problem with factor analysis

2011-01-24 Thread Mark Difford
>> Does anyone know what I am doing wrong? Could be a lot or could be a little, but we have to guess, because you haven't given us the important information. That you are following Crawley is of little or no interest. We need to know what _you_ did. What is "model" and what's in it? ## str(mode

[R] Problem with factor analysis

2011-01-24 Thread Simon Hayward
Hi all, I am using the example on page 737 of "The R Book" by Michael J Crawley, to plot factor loadings against each other (in a multivariate analysis). However the following line code plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1", ylab="Factor 2") throws a