roc_surro {MiMIR} | R Documentation |
roc_surro
Description
Function that creates a ROC curve of the selected metabolic surrogates as a plotly image
Usage
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 |
Value
plotly image with the ROC curves for one or more selected variables
Examples
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")
[Package MiMIR version 1.5 Index]