Skip to content

Problem with factor analysis

3 messages · Simon Hayward, Mark Difford, Juliet Hannah

#
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(model)
attributes(model)

If you fitted your model using factanal then loadings(model)[,1] will fail
with the following error message

##
Error in factanal(m1, factors = 3)[, 1] : incorrect number of dimensions

Even if you did not see such a message it seems likely that "model" is in
the wrong format for loadings to extract anything useful from it.

Regards, Mark.
3 days later
#
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="Factor 2")
plot(loadings(model)[,1],loadings(model)[,3],pch=16,xlab="Factor
1",ylab="Factor 3")
plot(loadings(model)[,1],loadings(model)[,4],pch=16,xlab="Factor
1",ylab="Factor 4")
plot(loadings(model)[,1],loadings(model)[,5],pch=16,xlab="Factor
1",ylab="Factor 5")


On Mon, Jan 24, 2011 at 7:03 AM, Simon Hayward
<SHayward at agenda21digital.com> wrote: