CVLasoelacox {MetabolicSurv} | R Documentation |
Cross Validations for Lasso Elastic Net Survival predictive models and Classification
Description
The function does cross validation for Lasso, Elastic net and Ridge regressions models before the survial analysis and classification. The survival analysis is based on the selected metabolites in the presence or absene of prognostic factors.
Usage
CVLasoelacox(
Survival,
Censor,
Mdata,
Prognostic,
Quantile = 0.5,
Metlist = NULL,
Standardize = TRUE,
Reduce = TRUE,
Select = 15,
Alpha = 1,
Fold = 4,
Ncv = 10,
nlambda = 100
)
Arguments
Survival |
A vector of survival time with length equals to number of subjects |
Censor |
A vector of censoring indicator |
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. |
Prognostic |
A dataframe containing possible prognostic(s) factor and/or treatment effect to be used in the model. |
Quantile |
The cut off value for the classifier, default is the median cutoff |
Metlist |
A list of metabolites to be considered in the model usually smaller than the metabolites in the Mdata . Default is to use all metabolites available and it is advisable to be greater than 17. |
Standardize |
A Logical flag for the standardization of the metabolite matrix, prior to fitting the model sequence. The coefficients are always returned on the original scale. Default is standardize=TRUE. |
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 the argument Reduce=TRUE |
Alpha |
The mixing parameter for glmnet
(see |
Fold |
number of folds to be used for the cross validation. Its value ranges between 3 and the numbe rof subjects in the dataset |
Ncv |
Number of validations to be carried out. The default is 25. |
nlambda |
The number of lambda values - default is 100 as in glmnet. |
Details
The function performs the cross validations for Lasso, Elastic net and Ridge regressions models for Cox proportional hazard model. Metabolites are selected at each iteration and then use for the classifier. This implies that predictive metabolites signature is varied from one cross validation to the other depending on selection. The underline idea is to investigate the Hazard Ratio for the train and test data based on the optimal lambda selected for the non-zero shrinkage coefficients, the nonzero selected metabolites will thus be used in the survival analysis and in calculation of the risk scores for each sets of data.
Value
A object of class cvle
is
returned with the following values
Coef.mat :A matrix of coefficients with rows equals to number of cross validations and columns equals to number of metabolites.
RuntimeA vector of runtime for each iteration measured in seconds.
lambdaA vector of estimated optimum lambda for each iterations.
nA vector of the number of selected metabolites
HRTrainA matrix of survival information for the training dataset. It has three columns representing the estimated HR, the 95% lower confidence interval and the 95% upper confidence interval.
HRTestA matrix of survival information for the test dataset. It has three columns representing the estimated HR, the 95% lower confidence interval and the 95% upper confidence interval.
pldA vector of partial likelihood deviance at each cross validations.
Met.matA matrix with 0 and 1. Number of rows equals to number of iterations and number of columns equals to number of metabolites. 1 indicates that the particular metabolite was selected or had nonzero coefficient and otherwise it is zero.
MdataThe Metabolite data matrix that was used for the analysis either same as Mdata or a reduced version.
Author(s)
Olajumoke Evangelina Owokotomo, olajumoke.owokotomo@uhasselt.be
Ziv Shkedy
See Also
coxph
,
EstimateHR
, glmnet
,
Lasoelacox
Examples
## FIRSTLY SIMULATING A METABOLIC SURVIVAL DATA
Data = MSData(nPatients = 100, nMet = 150, Prop = 0.5)
## USING THE FUNCTION
Results = CVLasoelacox(Survival = Data$Survival,Censor = Data$Censor,
Mdata = t(Data$Mdata),Prognostic = Data$Prognostic, Quantile = 0.5,
Metlist = NULL,Standardize = TRUE, Reduce=FALSE, Select=15,
Alpha = 1,Fold = 4,Ncv = 10,nlambda = 100)
## NUMBER OF SELECTED METABOLITES PER CV
Results@n
## GET THE MATRIX OF COEFFICIENTS
Results@Coef.mat
## SURVIVAL INFORMATION OF THE TRAIN DATASET
Results@HRTrain
## SURVIVAL INFORMATION OF THE TEST DATASET
Results@HRTest