View source: R/predictors_functions.R
roc_surro | R Documentation |
Function that creates a ROC curve of the selected metabolic surrogates as a plotly image
roc_surro(surrogates, bin_phenotypes, x_name)
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 |
plotly image with the ROC curves for one or more selected variables
require(pROC) require(plotly) require(foreach) require(MiMIR) #load the dataset met <- synthetic_metabolic_dataset phen<- synthetic_phenotypic_dataset #Calculating the binarized surrogates b_phen<-binarize_all_pheno(phen) #Apply a surrogate models and plot the ROC curve surr<-calculate_surrogate_scores(met, phen, MiMIR::PARAM_surrogates, colnames(b_phen)) #Plot the ROC curves roc_surro(surr$surrogates, b_phen, "sex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.