Finds and rotates empirical orthogonal functions (EOFs).

eof(x, n, scale. = TRUE)

Arguments

x

a data frame or matrix, with no missing values

n

number of EOFs to retain for rotation

scale.

logical indicating whether the (centered) variables should be scaled to have unit variance

Value

A list with the following members:

REOF

a matrix with rotated EOFs

amplitude

a matrix with amplitude time series of REOFs

eigen.pct

all eigenvalues of correlation matrix as percent of total variance

variance

variance explained by retained EOFs

Details

EOF analysis is used to study patterns of variability (“modes”) in a matrix time series and how these patterns change with time (“amplitude time series”). Hannachi et al. (2007) give a detailed discussion of this exploratory approach with emphasis on meteorological data. In oceanography and climatology, the time series represent observations at different spatial locations (columns) over time (rows). But columns can also be seasons of the year (Jassby et al. 1999) or even a combination of seasons and depth layers (Jassby et al. 1990). EOF analysis uses the same techniques as principal component analysis, but the time series are observations of the same variable in the same units. Scaling the data is optional, but it is the default here.

Eigenvectors (unscaled EOFs) and corresponding eigenvalues (amount of explained variance) are found by singular value decomposition of the centered and (optionally) scaled data matrix using prcomp. In order to facilitate a physical interpretation of the variability modes, a subset consisting of the n most important EOFs is rotated (Richman 1986). eofNum can be used to help choose n. Hannachi et al. (2007) recommend orthogonal rotation of EOFs scaled by the square root of the corresponding eigenvalues to avoid possible computation problems and reduce sensitivity to the choice of n. We follow this recommendation here, using the varimax method for the orthogonal rotation.

Note that the signs of the EOFs are arbitrary.

References

Hannachi, A., Jolliffe, I.T., and Stephenson, D.B. (2007) Empirical orthogonal functions and related techniques in atmospheric science: A review. International Journal of Climatology 27, 1119--1152.

Jassby, A.D., Powell, T.M., and Goldman, C.R. (1990) Interannual fluctuations in primary production: Direct physical effects and the trophic cascade at Castle Lake, California (USA). Limnology and Oceanography 35, 1021--1038.

Jassby, A.D., Goldman, C.R., Reuter, J.E., and Richards, R.C. (1999) Origins and scale dependence of temporal variability in the transparency of Lake Tahoe, California-Nevada. Limnology and Oceanography 44, 282--294.

Richman, M. (1986) Rotation of principal components. Journal of Climatology 6, 293--335.

Author

Alan Jassby, James Cloern

Examples


# Create an annual matrix time series
chla1 <- aggregate(sfbayChla, 1, mean, na.rm = TRUE)
chla1 <- chla1[, 1:12]  # remove stations with missing years
# eofNum (see examples) suggests n = 1
eof(chla1, 1)
#> $REOF
#>          EOF1
#> s21 0.9152475
#> s22 0.8817009
#> s23 0.9426172
#> s24 0.9316475
#> s25 0.9240967
#> s26 0.8237361
#> s27 0.9556114
#> s28 0.8561061
#> s29 0.9329812
#> s30 0.8988690
#> s31 0.7818497
#> s32 0.7499585
#> 
#> $amplitude
#>             EOF1
#> 1978 -1.21246216
#> 1979 -1.08159929
#> 1980 -1.19668945
#> 1981 -0.95979724
#> 1982 -0.88995894
#> 1983  0.01869466
#> 1984 -0.65889638
#> 1985 -0.61722327
#> 1986 -0.09960840
#> 1987 -1.36420948
#> 1988 -0.77820092
#> 1989 -0.35212181
#> 1990 -0.29661253
#> 1991 -0.99695028
#> 1992 -0.88599877
#> 1993 -0.21069317
#> 1994 -0.70986756
#> 1995  0.75970351
#> 1996 -0.84507273
#> 1997  0.28070836
#> 1998  1.09741867
#> 1999  0.88113847
#> 2000  1.05562316
#> 2001  0.90843729
#> 2002  0.50056531
#> 2003  1.76822671
#> 2004  0.45840044
#> 2005  0.19162750
#> 2006  2.04777652
#> 2007  1.28143762
#> 2008  1.90620420
#> 
#> $eigen.pct
#>  [1] 78.4  8.1  7.0  3.5  1.4  0.5  0.3  0.3  0.2  0.2  0.1  0.1
#> 
#> $variance
#>  [1]  78.4  86.5  93.5  97.0  98.4  98.9  99.2  99.5  99.7  99.8  99.9 100.0
#>