The function uses the glmnet function to firstly do the variable selection either with Lasso, Elastic net or ridge regressions before the survial analysis. The survival analysis is based on the selected metabolites in the presence or absence of prognostic factors.
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
Plots: A boolean parameter indicating if plots should be shown. Default is FALSE. If TRUE, the first plot is the partial likelihood deviance against the logarithmn of each lambda while the second is the coefficients versus the lamdas
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.
Alpha: The mixing parameter for glmnet (see glmnet). The range is 0<= Alpha <= 1. The Default is 1
Fold: number of folds to be used for the cross validation. Its value ranges between 3 and the numbe rof subjects in the dataset
nlambda: The number of lambda values - default is 100 as in glmnet .
Returns
A object is returned with the following values - Coefficients.NonZero: The coefficients of the selected metabolites
Selected.Mets: The selected metabolites
n: The number of selected metabolites
Risk.scores: The risk scores of the subjects
Risk.group: The risk classification of the subjects based on the specified quantile
SurvFit: The cox analysis of the riskgroup based on the selected metabolites and the prognostic factors
Select: A Boolean argument indicating if there was selection or not
Details
This is a wrapper function for glmnet and it fits models using either Lasso, Elastic net and Ridge regressions. This is done in the presence or absence of prognostic factors. The prognostic factor when avaialable will always be forced to be in the model so no penalty for it. Optimum lambda will be used to select the non-zero shrinkage coefficients, the nonzero selected metabolites will thus be used in the survival analysis and in calculation of the risk scores.
Examples
## FIRSTLY SIMULATING A METABOLIC SURVIVAL DATAData = MSData(nPatients =100, nMet =150, Prop =0.5)## USING THE FUNCTIONResults = Lasoelacox(Survival=Data$Survival, Censor=Data$Censor,Mdata=t(Data$Mdata), Prognostic = Data$Prognostic, Quantile =0.5,Metlist =NULL, Plots =FALSE, Standardize =TRUE, Alpha =1)## VIEW THE SELECTED METABOLITESResults$Selected.mets
## NUMBER OF SELECTED METABOLITESResults$n
## VIEW THE CLASSIFICATION GROUP OF EACH SUBJECTResults$Risk.Group
## VIEW THE SURVIVAL ANALYSIS RESULTResults$SurvFit
## TO CHECK IF THERE WAS ANY SELECTIONResults$Select