View source: R/ConsensusOPLS.R
ConsensusOPLS  R Documentation 
Constructs the consensus OPLS model with the optimal number of orthogonal components for given data blocks and response, and evaluate the model quality w.r.t other models built with randomly permuted responses.
ConsensusOPLS(
data,
Y,
maxPcomp = 1,
maxOcomp = 5,
modelType = "da",
nperm = 100,
cvType = "nfold",
nfold = 5,
nMC = 100,
cvFrac = 4/5,
kernelParams = list(type = "p", params = c(order = 1)),
mc.cores = 1,
verbose = FALSE
)
data 
A list of data blocks. Each element of the list must be of matrix type. Rows and columns can be identified (names), in which case this will be retained during analysis. Any preprocessing of the data (e.g. scaling) must be carried out before building the model. 
Y 
A vector, factor, dummy matrix or numeric matrix for the response. The type of answer given will condition the model to be used: a numeric vector for linear regression, a factor or dummy matrix for logistic regression or a discriminant model. 
maxPcomp 
Maximum number of Ypredictive components used to build the optimal model. Default, 1. 
maxOcomp 
Maximum number of Yorthogonal components used to build the optimal model. Default, 5. 
modelType 
String for type of OPLS regression model, either 
nperm 
Number of random permutations desired in response Y. Default, 100. 
cvType 
String for type of crossvalidation used. Either 
nfold 
Number of folds performed in nfold crossvalidation. This can be set to the number of samples to perform LeaveOneOut cross validation. Default, 5. 
nMC 
An integer indicating the number of rounds performed when

cvFrac 
A numeric value indicating the fraction of observations from

kernelParams 
List of parameters for the kernel. Either 
mc.cores 
Number of cores for parallel computing. Default, 1. 
verbose 
A logical indicating if detailed information (cross validation) will be shown. Default, FALSE. 
An object of class ConsensusOPLS
representing the consensus
OPLS model fit.
data(demo_3_Omics)
datablocks < lapply(demo_3_Omics[c("MetaboData", "MicroData", "ProteoData")], scale)
res < ConsensusOPLS(data=datablocks,
Y=demo_3_Omics$Y,
maxPcomp=1, maxOcomp=2,
modelType='da',
nperm=5)
res
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.