Description Usage Arguments Details Value Examples

This function carries out the canonical correlation analysis between two groups of mixed functional and scalar variables. Three different representing methods can be used for the functional coefficients. The tuning parameters should be specified in the arguments `control1`

and `control2`

for the two groups `xL1`

and `xL2`

, respectively.

1 2 |

`xL1` |
The mixed scalar and functional variables. For any number and any type of variables, |

`xL2` |
Same as |

`centre` |
Logic argument. Default is |

`method` |
The representative methods for the functional coefficients. The method could be one of the 'basis', 'gq' and 'raw' for basis function expression, Gaussian quadrature and representative data points, respectively. |

`control1` |
List of elements that controls the details of the functional coefficients for |

`control2` |
Similar to |

`tol` |
The threshold to decide whether the correlation is to small to be non-zero. |

This function uses Moore-Penrose generalized inverse in the calculation to avoid sigular problem.

`corr` |
All the non-zero canonical correlation. |

`coef1` |
The corresponding coefficients (weights) for the |

`coef2` |
The corresponding coefficients (weights) for the |

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
# library(flars)
# library(fda)
## Generate some data sets.
# dataL1=data_generation(seed = 1,uncorr = FALSE,nVar = 8,nsamples = 120,
# var_type = 'm',cor_type = 1)
# dataL1=dataL1$x
# dataL2=data_generation(seed = 2,uncorr = FALSE,nVar = 8,nsamples = 120,
# var_type = 'm',cor_type = 1)
# dataL2=dataL2$x
## cross validation
# outCV=fccaXXcv(xL1 = dataL1[1:2], xL2 = dataL2[1:2], method = 'basis'
# ,alpha = 10^seq(-6,0,len=5))
# cvCor=outCV$cor
# calculate the correlation
# out=fccaXX(dataL1, dataL2, method = 'basis',control1 = list(pen1=
# outCV$alpha[which.max(cvCor)]),control2 = list(pen1=
# outCV$alpha[which.max(cvCor)]))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.