# Factor analyzing a correlation matrix is SO easy (I am not making this up)

When I first went to graduate school in the 1970s (yes, for my MBA, in 1978) , if one were to comment casually,

“And then I factor-analyzed the correlation matrix to solve that problem.”

Everyone would say,

“Ooooh.”

Back in those days before statistical calculators (forget the Internet), when computers only came in big (really big) blue boxes and SAS probably was still compiled on punched cards and your department had to  pay for computer time, you did it by hand if you were a broke graduate student. Yes, I mean literally with a pencil in your hand. First, you computed the correlations between each of the items and then you applied some equations you can find in any detailed book on factor analysis, which I had forgotten and then looked up again in the documentation here. It doesn’t matter anyway because no one does it that way any more.

Since I had SAS Enterprise Guide open, I just pointed and clicked my way through. First I clicked on the data set I had opened and then went to the TASKS menu, pulled down to MULTIVARIATE and then CORRELATIONS.

Next, I just clicked on the variables I wanted to use in my analysis and clicked the blue arrow in between panes of the window to select them as my analysis variables. You can also shift-click to select a bunch at once. Don’t click RUN yet!

You need to output the correlation matrix as a SAS dataset of type= CORR. Fortunately, that is super-duper easy. You just click in the far left pane on the option that says OUTPUT DATA. Then click in the box next to SAVE OUTPUT DATA . Now you can click RUN.

Now that you have a correlation matrix, you can go ahead and factor analyze it just like you did before. Click here if you don’t remember.

Note that

“The data set created by the CORR procedure is automatically given the TYPE=CORR data set option, so you do not have to specify TYPE=CORR.”

I’m pretty sure this was not always the case, but according to the SAS documentation, it is now. So, now that you have your input data set, you just click on it, go to TASKS > MULTIVARIATE > FACTOR ANALYSIS like before and there you have it.

But …. what exactly do you have? Check back here for my next post titled (I am not making this up), “What’s all that factor analysis crap mean, anyway?”
=================================================

Learn math. Save lives. Learn culture. Kill animals. (Relax, it’s a game.)

Yeah, speaking of killing animals, The Perfect Jennifer is quite upset about shooting the buffalo in the game as she is a vegetarian and extremely soft-hearted even about shooting virtual animals. She asked Dr. Longie, our Dakota cultural consultant, didn’t they have vegetarians back in the day.

He said, “Yes, the Dakota had people who didn’t eat meat. We called them ‘Bad Hunters’.”

local_offerevent_note July 3, 2013

account_box

## 2 thoughts on “Factor analyzing a correlation matrix is SO easy (I am not making this up)”

• PROC CORR and OUTP has created TYPE=CORR output for a long time. From the SAS v8 doc:

By default, the output data set is a special data set type (TYPE=CORR) that many SAS/STAT procedures recognize, including PROC REG and PROC FACTOR. When you specify the NOCORR option and the COV, CSSCP, or SSCP option, use the TYPE= data set option to change the data set type to COV, CSSCP, or SSCP.

• Oh, yes, I knew the TYPE = CORR isn’t new but I thought it used to be that you had to specify somewhere on your PROC FACTOR statement that the dataset type was CORR . I thought I recalled having to do that back in the 1980s when I first learned this but maybe I am confusing it with the need to specify TYPE = CORR when you are reading in a correlation matrix in the data step.

This site uses Akismet to reduce spam. Learn how your comment data is processed.