# NOT RUN {
# fit aba model
model <- aba_model() %>%
set_data(adnimerge %>% dplyr::filter(VISCODE == 'bl')) %>%
set_groups(everyone()) %>%
set_outcomes(ConvertedToAlzheimers, CSF_ABETA_STATUS_bl) %>%
set_predictors(
PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl,
c(PLASMA_ABETA_bl, PLASMA_PTAU181_bl, PLASMA_NFL_bl)
) %>%
set_stats('glm') %>%
fit()
# summarise aba model to calculate metrics
model_summary <- model %>% aba_summary()
# plot the metrics using default (defaults to AUC)
metric_plot <- model_summary %>% aba_plot_metric()
# coord flip
metric_plot2 <- model_summary %>% aba_plot_metric(coord_flip=TRUE)
# compare predictor sets within each outcome instead of the opposite
metric_plot3 <- model_summary %>%
aba_plot_metric(x = 'outcome', group='predictor')
# }
Run the code above in your browser using DataLab