Function that creates a ROC curve of the selected metabolic surrogates as a plotly image
roc_surro(surrogates, bin_phenotypes, x_name)
Arguments
surrogates: numeric data.frame of metabolomics-based surrogate values by Bizzarri et al.
bin_phenotypes: logic data.frame of binarized phenotypes
x_name: vector of strings with the names of the selected binary phenotypes for the roc
Returns
plotly image with the ROC curves for one or more selected variables
Examples
require(pROC)require(plotly)require(foreach)require(MiMIR)#load the datasetmet <- synthetic_metabolic_dataset
phen<- synthetic_phenotypic_dataset
#Calculating the binarized surrogatesb_phen<-binarize_all_pheno(phen)#Apply a surrogate models and plot the ROC curvesurr<-calculate_surrogate_scores(met, phen, MiMIR::PARAM_surrogates, colnames(b_phen))#Plot the ROC curvesroc_surro(surr$surrogates, b_phen,"sex")