cca.ct | R Documentation |
A continuous-time version of canonical correlation analysis (CCA).
cca.ct(fdobj1, fdobj2)
fdobj1 , fdobj2 |
a pair of continuous-time multivariate data sets, of class |
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 |
Columns of the output matrix vex2
are flipped as needed to ensure positive correlations.
Biplab Paul <paul.biplab497@gmail.com> and Philip Tzvi Reiss <reiss@stat.haifa.ac.il>
cancor
, for classical CCA
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.