Factor Analysis

Factor analysis with Stata is accomplished in several steps. I will propose a simple series of such steps; normally you will like to pause after the second or third step and think about going further.

factor var24a-var24g var24j var24m, pcf
estat kmo
rotate, orthogonal varimax blanks(.5)
rotate, promax(4) blanks(.5)

In the first step, a principal componenent analysis is performed; the second command requests computation of the Kaiser-Meyer-Olkin values which indicate whether or not all of the variables are indeed apt for inclusion into the analysis. The third command creates a scree plot. With the help of the eigenvalues displayed in step one and the scree plot you may wish to determine whether you may specify a different number of factors. Normally, Stata extracts factors with an eigenvalue of 1 or larger. Of course, typically you will also inspect the (rotated) factor matrix to judge whether the solution achieved thus far is meaningful or satisfactory.

Step four requests varimax rotation. Option "blanks(.5)" means that all factor loadings <.5 will be replaced by blanks. Step five requests an oblique rotation instead; option "promax(4)" overrides the default value of 3. (Technical details of this are complicated; I do not mention this to recommend such a procedure, rather I do it to show you how it works.)

Number of factors

To deviate from the default procedure (extraction of factors with eigenvalue >1) you may wish to do one of the following:

factor var24a-var24g var24j var24m, pcf fac(5)
factor var24a-var24g var24j var24m, pcf fac(5) mineigen(.7)
factor var24a-var24g var24j var24m, mineigen(1.2)

The first command requests extraction of five factors. However, this works only if there are at least five factors with an eigenvalue >1. If the number of such factors is smaller, you will get fewer factors accordingly. The second version offers a way round this dilemma; if there are five or more factors with an eigenvalue >.7, those five with the highest eigenvalue will be extracted. Finally, you may also wish extraction of factors according to eigenvalues only, deviating from the default value of 1. The third version gives an example.

Further options

Instead of principal component analysis (remember, this is what the option "pcf" in the factor command was for), other options for creating (extracting) factors are available, such as

  • pf: principal factor analysis (the default if there is no option mentioned)
  • ipf: iterated principal factor analysis
  • ml: maximum likelihood

Many other options are available which are beyond the scope of this text.

© W. Ludwig-Mayerhofer, Stata Guide | Last update: 19 Jun 2012