CVPcaPls {MetabolicSurv} | R Documentation |
Cross Validations for PCA and PLS based methods
Description
This function does cross validation for the analysis performs by SurvPcaClass
and SurvPlsClass
functions where the dimension reduction methods can either be PCA and PLS.
Usage
CVPcaPls(
Fold = 3,
Survival,
Mdata,
Censor,
Reduce = TRUE,
Select = 15,
Prognostic = NULL,
Ncv = 5,
DR = "PCA"
)
Arguments
Fold |
Number of times in which the dataset is divided. Default is 3 which implies dataset will be divided into three groups and 2/3 of the dataset will be the train datset and 1/3 will be to train the results. |
Survival |
A vector of survival time with length equals to number of subjects |
Mdata |
A large or small metabolic profile matrix. A matrix with metabolic profiles where the number of rows should be equal to the number of metabolites and number of columns should be equal to number of patients. |
Censor |
A vector of censoring indicator |
Reduce |
A boolean parameter indicating if the metabolic profile matrix should be reduced, default is TRUE and larger metabolic profile matrix is reduced by supervised pca approach and first pca is extracted from the reduced matrix to be used in the classifier. |
Select |
Number of metabolites (default is 15) to be selected from supervised PCA. This is valid only if th argument Reduce=TRUE |
Prognostic |
A dataframe containing possible prognostic(s) factor and/or treatment effect to be used in the model. |
Ncv |
The Number of cross validation loop. Default is 50 but it is recommended to have at least 100. |
DR |
The dimension reduction method. It can be either "PCA" for Principle components analysis or "PLS" for Partial least squares. |
Details
This function does cross validation for the analysis using two reduction method. The reduction method can be PCA or PLS. If it is PCA then the SurvPcaClass
is internally used for the cross validation and SurvPlsClass
otherwise.
Value
A object of class cvpp
is returned with the following values
Result |
A dataframe containg the estimated Hazard ratio of the test dataset and the training dataset |
Ncv |
The number of cross validation performed |
Method |
The dimesion reduction method used |
CVtrain |
The training dataset indices matrix used for the cross validation |
CVtest |
The test dataset indices matrix used for the cross validation |
Select |
The number of metabolite used for the dimesion reduction method used |
Author(s)
Olajumoke Evangelina Owokotomo, olajumoke.owokotomo@uhasselt.be
Ziv Shkedy
References
Bair E, Hastie T, Debashis P, Tibshirani R (2006). “Prediction by supervised principal components.” American Statistics Association,, 101(473), 119–137.
See Also
Examples
## FIRSTLY SIMULATING A METABOLIC SURVIVAL DATA
Data = MSData(nPatients = 100, nMet = 150, Prop = 0.5)
## USING THE FUNCTION
Result = CVPcaPls(Fold = 4, Survival = Data$Survival,
Mdata = t(Data$Mdata), Censor = Data$Censor, Reduce=TRUE,
Select=19, Prognostic= Data$Prognostic,Ncv=55,DR ="PLS")
## GET THE CLASS OF THE OBJECT
class(Result) # An "cvpp" Class
## METHOD THAT CAN BE USED FOR THE RESULT
show(Result)
summary(Result)
plot(Result)