This function creates a roc stat object which can be passed as input
set_stats() function when building an aba model. This stat performs
a traditional ROC / cutpoint analysis from a binary outcome using the
optimal.cutpoints function from the
OptimalCutpoints package. Note that
outcomes for this model should be binary and coded as 0 = healthy and
1 = disease.
Coefficients will be presented as the optimal cutpoint for the model derived
from Youden's index (or whatever method is specified).
Default metrics include AUC.
1 2 3 4 5 6
'<' or '>. Which direction to interpret as being further from the healthy value. '<' is the default value and is interpreted as increasing predictor values are worse. '>' is therefore interpreted as higher predictor values are closer to healthy (outcome value of 0).
string. Which method to use to calculate the optimal cutoff
value. See the
logical. Whether to standardize model predictors and covariates prior to analysis.
logical. Whether to only include the subset of data with no missing data for any of the outcomes, predictors, or covariates. Note that complete cases are considering within each group - outcome combination but across all predictor sets.
An abaStat object with
glm stat type.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
data <- adnimerge %>% dplyr::filter(VISCODE == 'bl') # fit a roc model to predict a binary outcome model <- data %>% aba_model() %>% set_groups( everyone(), DX_bl %in% c('MCI', 'AD') ) %>% set_outcomes(CSF_ABETA_STATUS_bl) %>% set_predictors(PLASMA_PTAU181_bl, PLASMA_NFL_bl) %>% set_stats( stat_roc(method='Youden') ) %>% fit() # summarise model model_summary <- model %>% summary() # if using predictors where higher values are better, then flip direction model2 <- model %>% set_predictors(PLASMA_ABETA_bl) %>% set_stats( stat_roc(direction = '>') ) %>% fit() model2_summary <- model2 %>% aba_summary()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.