I am very new to R and statistics as a whole so this may be a very simple question. I am trying to carry out empirical orthogonal function (EOF) analysis of sea-level pressure (SLP) data to determine the amplitude of the North Atlantic Oscillation over time.

I have a matrix (1000,756), with 1000 years of winter mean SLP (i.e. from December to March) at 756 grid points in the North Atlantic.

How do I go about doing an EOF analysis on this data?

I have spent the last week trying to do a crash course in R but am a little tight for time so I thought I would ask! Thanks in advance for any help.

  • 1
    $\begingroup$ Please define "EOF". $\endgroup$ – Roland Feb 17 '14 at 14:11
  • $\begingroup$ Hi Roland, an Empirical Orthogonal Function is essentially a Principle component analysis. The literature is very unclear and often uses the two terms (EOF/PCA) interchangeably. One definition is "the EOF method finds both time series and spatial patterns". $\endgroup$ – Edward Armstrong Feb 17 '14 at 16:07

R has routines for doing PCA (prcomp is the preferred method), and also SVD (svd)*, which are the bases for EOF. It also has a screeplot and other tools, but I'm not sure how much code you'll have to put around the SVD itself to do what you want.

There is a spacetime package that has a function EOF. On github there is the sinkr package with an EOF function. At one point, there was a clim.pact package in R, which features an EOF function, but it has been removed from CRAN (perhaps because no longer maintained).

EDIT: You may find answers to a similar question useful.

EDIT 2: There are also at least three versions of "EOF": EOF, REOF (Rotated EOF), and EEOF (Extended EOF, to include time correlations). At least according to one page I saw online, which might be outdated and perhaps EOF always refers to EEOF now-a-days. Do you know what version you want to use?

* The prcmp documentation mentions it does an SVD under the hood, so these two options are not totally distinct.

  • $\begingroup$ Hi Wayne, thank you for your answer. According to the literature I need to do plain EOF analysis. As there is no longer an EOF function in R I have done the standard princomp. $\endgroup$ – Edward Armstrong Feb 19 '14 at 12:13
  • $\begingroup$ @EdwardArmstrong: R has a princomp which is mainly for compatability with its predecessor language S. The preferred function to use is prcomp, which uses SVD. It mentions this if you get help on princomp: ?princomp. $\endgroup$ – Wayne Feb 19 '14 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.