Learn R Programming

STATegRa (version 1.0.0)

modelSelection: Number of optimal common and distinctive components in object-wise data

Description

This function combine the function selectCommonComps and PCA.selection to stimate the optimal number of common and distinctive components in object-wise data. That is, it calculates the optimal number of common and individual components depending on the maximal number of common components and the individual components selection criteria provided by the user. The result is a list with the optimal number of common and distinctive components. This optimal number can be use for component analysis with function omicsCompAnalysis

Usage

modelSelection(Input,Rmax,fac.sel,varthreshold=NULL,nvar=NULL,PCnum=NULL)

Arguments

Input
List of ExpressionSet objects, one for each block of data
Rmax
Maximum number of common components
fac.sel
Criterium for selecting number of components. The posible option are: "%accum", "single%", "rel.abs" and "fixed.num"
varthreshold
Threshold for the selection of components in "%accum", "single%" criterions
nvar
Threshold applied when the option "rel.abs" is selected
PCnum
Fixed number of components to select when the option "fixed.num" is selected

Value

The function returns a list with the following components:
common
Number of optimal common components
dist
Number of optimal distictive components for each block

See Also

selectCommonComps,PCA.selection,omicsCompAnalysis

Examples

Run this code
data(STATegRa_S3)

## Create ExpressionSets
# Block1 - Expression data
B1 <- createOmicsExpressionSet(Data=Block1.PCA,pData=ed.PCA,pDataDescr=c("classname"))
# Block2 - miRNA expression data
B2 <- createOmicsExpressionSet(Data=Block2.PCA,pData=ed.PCA,pDataDescr=c("classname"))

## Model Selection
ms <- modelSelection(Input=list(B1,B2),Rmax=4,fac.sel="single%",
                      varthreshold=0.03)
ms

Run the code above in your browser using DataLab