Description Usage Arguments Details Value References Examples
Canonical correlation analysis (CCA) is sometimes referred to as a
double-barreled principal component analysis. Loosely, it fits a linear
regression model to the scores of principal component decompositions for
of the predictors X
and responses Y
. Oftentimes, only the
largest k principal components are used to make predictions.
1 | cca.predict(X, Y, X.new, k.x, k.y)
|
X |
An |
Y |
An |
X.new |
An |
k.x |
An integer less than |
k.y |
An integer less than |
CCA has been used to predict a teleconnected response (like precipitation) using the remote field generating the teleconnection (like ocean temperatures). In this application, principal components are often referred to as empirical orthogonal functions (EOFs).
Y.new Predicted values for Y.new
Cook, E.R., Briffa, K.R., and Jones, P.D., 1994, Spatial regression methods in dendroclimatology: A review and comparison of two techniques: International Journal of Climatology, v. 14, p. 379-402.
Glahn, H.R., 1968, Canonical Correlation and Its Relationship to Discriminant Analysis and Multiple Regression: Journal of the Atmospheric Sciences, v. 25, p. 23-31.
1 2 3 4 5 6 7 8 9 | data("coprecip")
attach(coprecip)
# compute CCA predictions of Y (CO precipitation) given Z (Pacific ocean SSTs)
# using 2 principal components (aka. EOFs)
preds = cca.predict(X = Z, Y = Y, X.new = Z, k.x = 2, k.y = 2)
# compute R^2
1 - var(as.numeric(preds-Y)) / var(as.numeric(Y))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.