Learn R Programming

ctmva (version 1.6.0)

cca.ct: Continuous-time canonical correlation analysis

Description

A continuous-time version of canonical correlation analysis (CCA).

Usage

cca.ct(fdobj1, fdobj2)

Value

A list consisting of

vex1, vex2

matrices defining the canonical variates. The first columns of each give the coefficients defining the first pair of canonical variates; and so on.

cor

canonical correlations, i.e., correlations between the pairs of canonical variates

Arguments

fdobj1, fdobj2

a pair of continuous-time multivariate data sets, of class "fd"

Author

Biplab Paul <paul.biplab497@gmail.com> and Philip Tzvi Reiss <reiss@stat.haifa.ac.il>

See Also

cancor, for classical CCA

Examples

Run this code

if (FALSE) {

# CCA relating Canadian daily temperature and precipitation data
require(fda)
data(CanadianWeather)
daybasis <- create.bspline.basis(c(0,365), nbasis=80)
tempfd <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"Temperature.C"], daybasis)$fd
precfd <- smooth.basis(day.5, CanadianWeather$dailyAv[,,"log10precip"], daybasis)$fd
tpcor <- cca.ct(tempfd, precfd)
par(mfrow=1:2)
barplot(tpcor$vex1[,1], horiz=TRUE, las=1, main="Temperature",
            sub="First canonical coefficients vector")
barplot(tpcor$vex2[,1], horiz=TRUE, las=1, main="Log precipitation",
            sub="First canonical coefficients vector")

}


Run the code above in your browser using DataLab