# NOT RUN {
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()
# }
Run the code above in your browser using DataLab