ttest_surrogates {MiMIR} | R Documentation |
Function that calculates a t-test and a plotly image of the selected surrogates
ttest_surrogates(surrogates, bin_phenotypes)
surrogates |
numeric data.frame containing the surrogate values by Bizzarri et al. |
bin_phenotypes |
numeric data.frame with the binarized phenotypes output of binarize_all_pheno |
Barplot and T-test indicating if the surrogate variables could split accordingly the real value of the binary clinical variables.
plotly image with all the ROCs for all the available clinical variables
require(pROC)
require(plotly)
require(MiMIR)
require(foreach)
#load the dataset
m <- synthetic_metabolic_dataset
p <- synthetic_phenotypic_dataset
#Calculating the binarized surrogates
b_p<-binarize_all_pheno(p)
#Apply a surrogate models and plot the ROC curve
surr<-calculate_surrogate_scores(met=m, pheno=p, MiMIR::PARAM_surrogates, bin_names=colnames(b_p))
ttest_surrogates(surr$surrogates, b_p)