# Factor analysis question

#### aelliott54

##### New Member
I am working on a project where I need to write Business Requirements for how to take a raw data file, run factor analysis against it and then output the results (Factor loadings, etc.) In short, I am looking for the code or an API of sorts.

Anyone know a good resource to look at. I am staring at some text books, but looking for something easier than having to remember linear algebra from 20 years ago.

#### spunky

##### Can't make spagetti
do you have to work on this from scratch? there is a very useful algorithmic way to do your own factor analysis. almost nobody uses it anymore given the increased power of computers available and that you can do maximum likelihood on it. the one i'm telling you about follows more or less the same logic behind principal components analysis but you operate on a modified correlation matrix.

#### noetsi

##### No cake for spunky
When you say factor analysis do you mean exploratory factor analysis or confirmatory factor analysis (SEM). I know some good SEM books.

#### aelliott54

##### New Member
Not really particular on method. If I can get some code / algorithm to run straight up Principal Components Analysis (No rotation), extract all Factors with Eigenvalues over 1.0 - that would suffice. We are building a Product Demo - and does not have to be perfect - yet. Just functional.

Looking for something straight-forward easy that we can use to produce the concept.

#### spunky

##### Can't make spagetti
i can't emphasize enough (more out of habit nowadays rather than true interest) that principal components analysis and factor analysis are not the same. i can see you're building a demo so it shouldn't matter too much in this case, but just to get it out there.

in aaaaany case... if you go to R (you know R, right? if not, you can download it from here: http://cran.r-project.org/)

Code:
eigen
on the console board to see the code of how it extracts the principal components/eigenvalues of a matrix.

or to get a better sense of how it does it, on the console, you can do:

Code:
getAnywhere("princomp.default")
and it will show you exactly what it does.

assuming you know how to read code (and R's is pretty straight-forward) i think you ca use that as a template to obtain what you're looking for...

#### noetsi

##### No cake for spunky
Sounds like EFA....and there are huge differences between EFA and CFA