This function applies a Simultaneous Component Analysis (SCA). The idea is that the scores for both blocks should have a similar behaviour if the components are in the common mode. Evaluation is by the ratios between the explained variances (SSQ) of each block and the estimator. The highest component count with 0.8 < ratio < 1.5 is selected.
Usage
selectCommonComps(X, Y, Rmax)
Arguments
X
Matrix of omics data
Y
Matrix of omics data
Rmax
Maximum number of common components to find
Value
A list with components:
common
Optimal number of common components
ssqs
Matrix of SSQ for each block and estimator
pssq
ggplot object showing SSQ for each block and estimator
pratios
ggplot object showing SSQ ratios between each block and estimator
Author(s)
Patricia Sebastian-Leon
Examples
data(STATegRa_S3)
cc <- selectCommonComps(X=Block1.PCA, Y=Block2.PCA, Rmax=3)
cc$common
cc$pssq
cc$pratios
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(STATegRa)
Warning message:
replacing previous import 'Biobase::combine' by 'gridExtra::combine' when loading 'STATegRa'
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/STATegRa/selectCommonComps.Rd_%03d_medium.png", width=480, height=480)
> ### Name: selectCommonComps
> ### Title: Select common components in two data blocks
> ### Aliases: selectCommonComps
> ### selectCommonComps,matrix,matrix,numeric-method
>
> ### ** Examples
>
> data(STATegRa_S3)
> cc <- selectCommonComps(X=Block1.PCA, Y=Block2.PCA, Rmax=3)
> cc$common
[1] 2
> cc$pssq
> cc$pratios
>
>
>
>
>
> dev.off()
null device
1
>