Description Usage Arguments Value Author(s) See Also Examples
getAUC() takes a series of outcomes, metabolites, and covariates and calculates AUC for each model. You can input as many outcomes and metabolites as you want.
1 |
dat |
Data frame containing your metabolites, outcome, and covariates |
outcome |
Numeric vector coded [0,1] for your outcome. |
compid |
Vector of COMP_IDs |
covariates |
Vector of covariate variable names (optional) |
normalize |
Normalize the data prior to modeling? (default is TRUE) |
If a single outcome is provided, getAUC() will return a data frame with the following variables
COMP_ID |
Each COMP_ID listed in compid argument |
OUTCOME |
Outcome |
AUC |
AUC calculation
If multiple outcomes are requested, getAUC() will return a list. Each data frame of the list corresponds to each of the outcomes.
Brian Carter and Becky Hodge
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # load metabolite data
metabolites <- getMetabolites("breast_metabolomics")
df <- left_join(survey,metabolites$metabolites,"ID")
comp.id <- metabolites$biochem$COMP_ID[1:10]
# code BMI categories as [0,1] - obese vs normal
df$bmi_binary <- ifelse(df$BMI < 25,0, ifelse(df$BMI >= 30,1,NA))
myAUC <- getAUC(df,
outcome="bmi_binary",
compid = comp.id,
covariates="AGE_INT",
normalize=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.