[R] princomp - varimax - factanal
William Revelle
lists at revelle.net
Fri Jan 30 18:59:10 CET 2009
At 3:00 PM +0100 1/30/09, Alberto Maceda Veiga wrote:
>Hi!
>
>I am trying to analyse with R a database that I have previously analysed
>with SPSS.
>
>Steps with SPSS:
>
>Factorial analysis
> Extraction options : I select = Principal component analysis
> Rotation: varimax
Unfortunately, SPSS labels principal components as a factor model.
It is not. So, extracting the first n factors by using factanal
will give you a very different solution than the first n principal
components.
>
>Steps with R:
>
>I have tried it with varimax function with factanal or with princomp...and
>the results are different of what I have with SPSS. I think that varimax
>function is incorporated in factanal function.
>
>
>Does anybody know which are the instructions into R to do exactly the same
>of what I have done with SPSS???
To duplicate the SPSS analysis try using the psych package.
The principal function in the psych package will extract the first n
components (defaults to 1) and then by default rotate using varimax.
library(psych)
pc <- principal(my.data,n) #where n is the number components you
want to extract
Let me know if this matches the SPSS output.
Bill
>
>
>
>Thank you very much!
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org 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.
--
William Revelle http://personality-project.org/revelle.html
Professor http://personality-project.org/personality.html
Department of Psychology http://www.wcas.northwestern.edu/psych/
Northwestern University http://www.northwestern.edu/
Attend ISSID/ARP:2009 http://issid.org/issid.2009/
More information about the R-help
mailing list