modelSelection {STATegRa} | R Documentation

## Find optimal common and distinctive components

### Description

Estimate the optimal number of common and distinctive components according to given selection criteria.

### Usage

    modelSelection(Input,Rmax,fac.sel,varthreshold=NULL,nvar=NULL,PCnum=NULL,center=FALSE,scale=FALSE,weight=FALSE, plot_common=FALSE, plot_dist=FALSE)

### Arguments

`Input` | List of `ExpressionSet` objects, one for each block of data
`Rmax` | Maximum common components
`fac.sel` | PCA criteria for selection ("%accum", "single%", "rel.abs", "fixed.num")
`varthreshold` | Cumulative variance criteria for PCA selection. Threshold for "%accum" or "single%" criteria.
`nvar` | Relative variance criteria. Threshold for "rel.abs".
`PCnum` | Fixed number of components for "fixed.num".
`center` | Character (or FALSE) specifying which (if any) centering will be applied before analysis. Choices are "PERBLOCKS" (each block separately) or "ALLBLOCKS" (all data together).
`scale` | Character (or FALSE) specifying which (if any) scaling will be applied before analysis. Choices are "PERBLOCKS" (each block separately) or "ALLBLOCKS" (all data together).
`weight` | Logical indicating whether weighting is to be done. Choices are "BETWEEN-BLOCKS"
`plot_common` | Logical indicating whether to plot the explained variances (SSQ) of each block and its estimation and the ratios
`plot_dist` | Logical indicating whether to plot the explained variances (SSQ) and the accumulated variance for each block

### Value

List containing:

common

  List with common components results

commonComps

  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

dist

  List containg the results of distinct PCA for each input block; for each block PCAres and numComps is returned within a list

PCAres

  List containing results of PCA, with fields "eigen", "var.exp", "scores" and "loadings"

nomComps

  Number of components selected

### Author(s)

Patricia Sebastian-Leon

### See Also

`omicsCompAnalysis`

### Examples

    data(STATegRa_S3)
    B1 <- createOmicsExpressionSet(Data=Block1.PCA,pData=ed.PCA,pDataDescr=c("classname"))
    B2 <- createOmicsExpressionSet(Data=Block2.PCA,pData=ed.PCA,pDataDescr=c("classname"))
    ms <- modelSelection(Input=list(B1, B2), Rmax=3, fac.sel="single\%", varthreshold=0.03, center=TRUE, scale=FALSE, weight=TRUE, plot_common=FALSE, plot_dist=FALSE)
    ms

[Package STATegRa version 1.26.0 Index]