CCA {clim.pact}R Documentation

Canonical correlation analysis

Description

Applies a canonical correlation analysis (CCA) to two data sets. The CCA here can be carried out in two different ways: i) an svd based approach (after Bretherton et al. (1992), J. Clim. Vol 5, p. 541, also documented in Benestad (1998): "Evaluation of Seasonal Forecast Potential for Norwegian Land Temperatures and Precipitation using CCA", DNMI KLIMA Report 23/98 at http://met.no/english/r_and_d_activities/publications/1998.html) or ii) a covariance-eigenvalue approach (after Wilks, 1995, "Statistical methods in the Atmospheric Sciences", Academic Press, p. 401).

The analysis can also be applied to either EOFs or fields.

Note: the analysis has sometimes been somewhat unstable, returning inconsistent results. The recommendation is to use EOFs and SVD option.

The CCA analysis can be used to develope statistical models according to:

Y = Psi X

Where Y is the predictand and X the predictor. plotCCA plots the CCA results, testCCA is for code verification, and Psi returns the matrix

Psi

.

stations2field turns a group of station objects into a field by the means of a simple and crude interpolation/gridding. check.repeat is a quality-control function that eliminates repeated years in the station objects.

Usage

CCA(x1,x2,SVD=TRUE,plot=TRUE,main="CCA",sub="",test=FALSE,i.eofs=1:8,LINPACK=TRUE)
plotCCA(cca)
testCCA(method="CCA",reconstr=FALSE,mode=1,test=TRUE,LINPACK=TRUE,SVD=TRUE,n.pc=4,synthetic=TRUE)
Psi(cca)
predictCCA(Psi,X)
stations2field(data.set=c("narp"),ele=101,obj.type="monthly.field.object",
               plot=TRUE,silent=FALSE,intrp.method="interpp",
               interpolation.option="simple")
check.repeat(x)

Arguments

cca A CCA object.
x1 A field or an eof object.
x2 A field or an eof object.
SVD Flag: determine which approach to use: SVD or eigenfunction-based alogithm.
plot Flag: plot the diagnostics.
test Flag: test by reconstructing one series (leading EOF or a grid-box series).
i.eofs Which EOFs to include (only when the input is given as eof objects).
LINPACK 'TRUE': svd; 'FALSE':La.svd
main main title (see link{plot}).
sub subtitle (see link{plot}).
method Which method to test: CCA or MVR.
reconstr For the test-reconstruction of fields.
mode Test for a particular EOF pattern/mode - the other modes are randomized.
n.pc Number of principal components to include.
synthetic Construct artificial test data from a random number generator and cosine series.
Psi CCA-based prediction model (a matrix): Y = Psi X
X A field object used as predictor: : Y = Psi X
data.set Strings (eg, "narp","nordklim",or "nacd") if data has been installed, or list of station objects (and nothing else)
ele element code - see getnordklim.
obj.type
silent
intrp.method Method fro gridding the data.
interpolation.option Either "simple","distance", or "test". In current version, it's only "simple" which seems to work.
x station object.

Value

A CCA object: a list containing a.m, b.m, u.k, v.k, and r, describing the Canonical Correlation variates, patterns and correlations. a.m and b.m are the patterns and u.k and v.k the vectors (time evolution).

Author(s)

R.E. Benestad

Examples

## Not run: 
data(DNMI.t2m)
data(DNMI.slp)
eof.1 <- EOF(DNMI.t2m,mon=1)
eof.2 <- EOF(DNMI.slp,mon=1)
cca <- CCA(eof.1,eof.2)
# Testing routine:
testCCA()

## End(Not run)

[Package clim.pact version 2.2-15 Index]