A function for calculating the captured variations for several
different number of retained dimensions. This is a wrapper
over `specificVar`

and `sharedVar`

to help
computing both for a range of dimensionalities.

1 |

`datasets` |
A list containing the data matrices to be combined. Each matrix needs to have the same number of rows (samples), but the number of columns (features) can differ. Each row needs to correspond to the same sample in every matrix. |

`regcca` |
Output of |

`dimVector` |
A list of dimensions for which the retained variations are to be computed. |

`plot` |
A logical variable with default value FALSE. If the value is TRUE, the functions creates a plot of the output. |

The function uses `specificVar`

and `sharedVar`

to do all the computation. The purpose of this function is to provide an
easy way to visualize the properties of the reduced-dimensional
representation created by drCCA. The function also estimates the
same quantities for PCA of concatenated feature vectors to illustrate
the difference to optimal linear model based on preserving the
total variation in the whole collection of data sets.

The function returns the data-specific and shared variance for the given values of dimensions in a list. The list has four components.

`pw_cca` |
A vector with values as shared variances captured by drCCA for the given dimensions |

`pw_pca` |
A vector with values as shared variances captured by PCA for the given dimensions |

`within_cca` |
A vector with values as data-specific variances captured by drCCA for the given dimensions |

`within_pca` |
A vector with values as data-specific variances captured by PCA for the given dimensions |

Abhishek Tripathi, Arto Klami

Tripathi A., Klami A., Kaski S. (2007), Simple integrative preprocessing preserves what is shared in data sources, *submitted for publication*.

`sharedVar`

,`specificVar`

1 2 3 4 5 | ```
# data(expdata1)
# data(expdata2)
# r <- regCCA(list(expdata1,expdata2))#
# plotVar(list(expdata1,expdata2),r,c(1:2),4)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.