-------------------------------------------------------------------------------
help for eofplot
-------------------------------------------------------------------------------

Plot coefficients or loadings after principal component or factor analysis

eofplot [, { components(numlist) | factors(numlist) } number norotated twoway_connect_options ]

Description

eofplot plots coefficients or loadings of principal components or factors after pca or factor in sequence in relation to all the variables used in the analysis. It is thus a profile or parallel coordinates plot of the matrix e(L) (or e(r_L) when that exists).

eofplot will by default plot rotated loadings when they can be found. That default can be overridden.

Remarks

There appears to be no standard name for this plot. The name loadingplot is already taken by Stata for a different though related plot. The name eofplot, although arbitrary, will at least suggest to some users the name empirical orthogonal functions (EOFs) widely used in meteorology and oceanography within one flavour of principal component analysis (PCA).

This plot is most natural and helpful when variables can be placed in a sequence (e.g. in terms of time or space) or grouped in terms of meaning. Conversely, the order of variables on the x axis is exactly that of the variables fed to the earlier pca or factor command, so that on occasion reissuing the original command with variables in a different order may allow a tidier plot to be produced afterwards.

Use of this graph within the literature appears intriguingly capricious. Thus, of the leading monographs on principal component analysis, Jackson (1991) includes no examples, but Jolliffe (2002) includes several. Ramsey and Schafer (2002, pp.519-521) give a very nice example, which was the original stimulus for this program. See also literature on PCA applications in meteorology and oceanography such as von Storch and Zwiers (1999) or Wilks (2006).

Options components() specifies which components are to be plotted. By default, all components are plotted. That may lead to an untidy graph. Thus a numlist may be specified with this option to select particular components to be plotted. For example, components(1/3) selects the first three components.

factors() specifies which factors are to be plotted. By default, all factors are plotted. That may lead to an untidy graph. Thus a numlist may be specified with this option to select particular factors to be plotted. For example, factors(1/3) selects the first three factors.

Note: Both options are given as a convenience. It is expected that users of pca will find the components() option naturally named, as will users of factor with the factor() option. However, there is no obligation to use the "correct" terminology.

number specifies that the various components or factors are to be distinguished on the plot by marker labels with the appropriate numbers. Thus components or factors 1, 2 and 3 would be distinguished by text with those numerals. This option carries with it the other options ms(i ..) mlabpos(0 ..) legend(off), but those options may in turn be overridden. Although not the default, this option is recommended for a graph that is most nearly clean and self-explanatory. See also marker label options.

norotated uses unrotated results, even when rotated results are available. The default is to use rotated results if they are available. norotated is ignored if rotated results are not available.

twoway_connect_options are options of twoway connect. The defaults include (given the number of variables included in the principal component analysis or factor analysis #variables) ytitle("loadings") xtitle(" ") xla(1/#variables, valuelabels) clw(thin ..). If rotated loadings are shown, a note() indicates the rotation used. See title options. Note that the x axis runs from 1 to #variables.

Examples

. sysuse auto, clear . pca headroom trunk weight length displacement . eofplot . eofplot, number . eofplot, number xsc(r(0.8 5.2)) . eofplot, number xsc(r(0.8 5.2)) mlabsize(*1.4 ..) . eofplot, number xsc(r(0.8 5.2)) mlabsize(*1.4 ..) xla(, grid)

Author

Nicholas J. Cox, Durham University n.j.cox@durham.ac.uk

References

Jackson, J.E. 1991. A User's Guide to Principal Components. New York: John Wiley. [reissued 2003 with some errata]

Jolliffe, I.T. 2002. Principal Component Analysis. New York: Springer.

Ramsey, F.L. and Schafer, D.W. 2002. The Statistical Sleuth: A Course in Methods of Data Analysis. Pacific Grove, CA: Duxbury.

von Storch, H. and Zwiers, F.W. 1999. Statistical Analysis in Climate Research. Cambridge: Cambridge University Press.

Wilks, D.S. 2006. Statistical Methods in the Atmospheric Sciences. Burlington, MA: Academic Press.

Also see

On-line: help for twoway connected, help for factor, help for factor postestimation, help for pca, help for pca postestimation, help for parplot (if installed)