# [R] How to determine the number of dominant eigenvalues in PCA

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 28 17:23:36 CEST 2004

```On Mon, 28 Jun 2004, Fred wrote:

> I want to know if there is some easy and reliable way
> to estimate the number of dominant eigenvalues
> when applying PCA on sample covariance matrix.

The short answer is `no' since it depends what you want to do PCA for (and
there are many possible uses).

> Assume x-axis is the number of eigenvalues (1, 2, ....,n), and y-axis is the
> corresponding eigenvalues (a1,a2,..., an) arranged in desceding order.
> So this x-y plot will be a decreasing curve. Someone mentioned using the elbow (knee) method
> to find the point that the maximal curvature of this curve occurs.
> The number at this point would be the number of dominant eigenvalues.

It's not a curve!  If you joins the points by line it is piecewise linear
and has curvature nowhere.

See ?screeplot and its references, since the plot is called a `scree
plot'.  It's a well known technique in all good textbooks on PCA.

> But I could not find any reference papers on this idea.
> Does anyone has tried this method or knows more details on this?

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

```